home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April / PCWorld_2008-04_cd.bin / v cisle / ozo / zotero-1.0.3.xpi / chrome / zotero.jar
PKZip Archive  |  2008-02-01  |  3.2 MB

view JSON data     |     view as text     |     open on a Mac     |     open on a PC

This file was processed as: PKZip Archive (archive/zip).

You can browse this item here: zotero.jar

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert PKZip Archive (archive/zip) magic Supported
66% dexvert JAR Archive (archive/jar) ext Supported
100% file Zip archive data, made by v2.3 UNIX, extract using at least v1.0, last modified, last modified Sun, Feb 01 2008 19:17:56, uncompressed size 0, method=store default
99% file Zip archive, with extra data prepended default
98% file data default
39% TrID VYM Mind Map default (weak)
25% TrID Mozilla Firefox browser extension default (weak)
22% TrID Mozilla Archive Format (gen) default (weak)
12% TrID ZIP compressed archive default
100% dexmagic PrintFox/Pagefox WEAK default
100% siegfried x-fmt/263 ZIP Format default
100% lsar Zip default
100% gt2 ZIP Archiv gefunden (Auflistung ist deaktiviert) default
100% detectItEasy Archive: Zip(1.0)[100.0%,440 files,92 dirs] default
100% binwalkID Zip archive data, at least v1.0 to extract, name: content/ default
100% xdgMime application/zip default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 4b 03 04 0a 00 00 00 | 00 00 3c 9a 41 38 00 00 |PK......|..<.A8..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 08 00 15 00 63 6f |........|......co|
|00000020| 6e 74 65 6e 74 2f 55 54 | 09 00 03 b4 b6 a3 47 b4 |ntent/UT|......G.|
|00000030| b6 a3 47 55 78 04 00 1d | 09 1d 09 50 4b 03 04 0a |..GUx...|...PK...|
|00000040| 00 00 00 00 00 3c 9a 41 | 38 00 00 00 00 00 00 00 |.....<.A|8.......|
|00000050| 00 00 00 00 00 18 00 15 | 00 63 6f 6e 74 65 6e 74 |........|.content|
|00000060| 2f 7a 6f 74 65 72 6f 2d | 70 6c 61 74 66 6f 72 6d |/zotero-|platform|
|00000070| 2f 55 54 09 00 03 b4 b6 | a3 47 b4 b6 a3 47 55 78 |/UT.....|.G...GUx|
|00000080| 04 00 1d 09 1d 09 50 4b | 03 04 0a 00 00 00 00 00 |......PK|........|
|00000090| 3c 9a 41 38 00 00 00 00 | 00 00 00 00 00 00 00 00 |<.A8....|........|
|000000a0| 1c 00 15 00 63 6f 6e 74 | 65 6e 74 2f 7a 6f 74 65 |....cont|ent/zote|
|000000b0| 72 6f 2d 70 6c 61 74 66 | 6f 72 6d 2f 77 69 6e 2f |ro-platf|orm/win/|
|000000c0| 55 54 09 00 03 b4 b6 a3 | 47 b4 b6 a3 47 55 78 04 |UT......|G...GUx.|
|000000d0| 00 1d 09 1d 09 50 4b 03 | 04 0a 00 00 00 00 00 f2 |.....PK.|........|
|000000e0| 26 58 37 eb 4e bd 3a 8c | 02 00 00 8c 02 00 00 28 |&X7.N.:.|.......(|
|000000f0| 00 15 00 63 6f 6e 74 65 | 6e 74 2f 7a 6f 74 65 72 |...conte|nt/zoter|
|00000100| 6f 2d 70 6c 61 74 66 6f | 72 6d 2f 77 69 6e 2f 69 |o-platfo|rm/win/i|
|00000110| 74 65 6d 50 61 6e 65 2e | 63 73 73 55 54 09 00 03 |temPane.|cssUT...|
|00000120| 87 08 1f 47 b4 b6 a3 47 | 55 78 04 00 1d 09 1d 09 |...G...G|Ux......|
|00000130| 23 7a 6f 74 65 72 6f 2d | 65 64 69 74 70 61 6e 65 |#zotero-|editpane|
|00000140| 2d 64 79 6e 61 6d 69 63 | 2d 66 69 65 6c 64 73 20 |-dynamic|-fields |
|00000150| 72 6f 77 20 3e 20 68 62 | 6f 78 2c 0a 23 7a 6f 74 |row > hb|ox,.#zot|
|00000160| 65 72 6f 2d 65 64 69 74 | 70 61 6e 65 2d 64 79 6e |ero-edit|pane-dyn|
|00000170| 61 6d 69 63 2d 66 69 65 | 6c 64 73 20 72 6f 77 20 |amic-fie|lds row |
|00000180| 3e 20 76 62 6f 78 0a 7b | 0a 09 6d 61 72 67 69 6e |> vbox.{|..margin|
|00000190| 2d 74 6f 70 3a 20 30 20 | 21 69 6d 70 6f 72 74 61 |-top: 0 |!importa|
|000001a0| 6e 74 3b 0a 09 6d 61 72 | 67 69 6e 2d 62 6f 74 74 |nt;..mar|gin-bott|
|000001b0| 6f 6d 3a 20 30 20 21 69 | 6d 70 6f 72 74 61 6e 74 |om: 0 !i|mportant|
|000001c0| 3b 0a 09 70 61 64 64 69 | 6e 67 2d 74 6f 70 3a 20 |;..paddi|ng-top: |
|000001d0| 30 20 21 69 6d 70 6f 72 | 74 61 6e 74 3b 0a 09 70 |0 !impor|tant;..p|
|000001e0| 61 64 64 69 6e 67 2d 62 | 6f 74 74 6f 6d 3a 20 30 |adding-b|ottom: 0|
|000001f0| 20 21 69 6d 70 6f 72 74 | 61 6e 74 3b 0a 7d 0a 0a | !import|ant;.}..|
|00000200| 23 7a 6f 74 65 72 6f 2d | 65 64 69 74 70 61 6e 65 |#zotero-|editpane|
|00000210| 2d 64 79 6e 61 6d 69 63 | 2d 66 69 65 6c 64 73 20 |-dynamic|-fields |
|00000220| 72 6f 77 20 3e 20 68 62 | 6f 78 20 3e 20 68 62 6f |row > hb|ox > hbo|
|00000230| 78 0a 7b 0a 09 2d 6d 6f | 7a 2d 62 6f 78 2d 61 6c |x.{..-mo|z-box-al|
|00000240| 69 67 6e 3a 20 63 65 6e | 74 65 72 3b 0a 7d 0a 0a |ign: cen|ter;.}..|
|00000250| 23 7a 6f 74 65 72 6f 2d | 65 64 69 74 70 61 6e 65 |#zotero-|editpane|
|00000260| 2d 64 79 6e 61 6d 69 63 | 2d 66 69 65 6c 64 73 20 |-dynamic|-fields |
|00000270| 72 6f 77 20 68 62 6f 78 | 20 68 62 6f 78 20 6c 61 |row hbox| hbox la|
|00000280| 62 65 6c 0a 7b 0a 09 6d | 61 72 67 69 6e 2d 74 6f |bel.{..m|argin-to|
|00000290| 70 3a 20 30 3b 0a 09 6d | 61 72 67 69 6e 2d 62 6f |p: 0;..m|argin-bo|
|000002a0| 74 74 6f 6d 3a 20 30 3b | 0a 7d 0a 0a 23 7a 6f 74 |ttom: 0;|.}..#zot|
|000002b0| 65 72 6f 2d 65 64 69 74 | 70 61 6e 65 2d 64 79 6e |ero-edit|pane-dyn|
|000002c0| 61 6d 69 63 2d 66 69 65 | 6c 64 73 20 72 6f 77 20 |amic-fie|lds row |
|000002d0| 3e 20 74 6f 6f 6c 62 61 | 72 62 75 74 74 6f 6e 0a |> toolba|rbutton.|
|000002e0| 7b 0a 09 6d 61 72 67 69 | 6e 2d 72 69 67 68 74 3a |{..margi|n-right:|
|000002f0| 20 35 70 78 3b 0a 09 2d | 6d 6f 7a 2d 69 6d 61 67 | 5px;..-|moz-imag|
|00000300| 65 2d 72 65 67 69 6f 6e | 3a 20 72 65 63 74 28 32 |e-region|: rect(2|
|00000310| 70 78 2c 20 31 34 70 78 | 2c 20 31 38 70 78 2c 20 |px, 14px|, 18px, |
|00000320| 30 70 78 29 3b 0a 7d 0a | 0a 23 7a 6f 74 65 72 6f |0px);.}.|.#zotero|
|00000330| 2d 65 64 69 74 70 61 6e | 65 2d 64 79 6e 61 6d 69 |-editpan|e-dynami|
|00000340| 63 2d 66 69 65 6c 64 73 | 20 72 6f 77 20 76 62 6f |c-fields| row vbo|
|00000350| 78 5b 66 69 65 6c 64 6e | 61 6d 65 3d 61 62 73 74 |x[fieldn|ame=abst|
|00000360| 72 61 63 74 4e 6f 74 65 | 5d 2c 0a 23 7a 6f 74 65 |ractNote|],.#zote|
|00000370| 72 6f 2d 65 64 69 74 70 | 61 6e 65 2d 64 79 6e 61 |ro-editp|ane-dyna|
|00000380| 6d 69 63 2d 66 69 65 6c | 64 73 20 72 6f 77 20 76 |mic-fiel|ds row v|
|00000390| 62 6f 78 5b 66 69 65 6c | 64 6e 61 6d 65 3d 65 78 |box[fiel|dname=ex|
|000003a0| 74 72 61 5d 0a 7b 0a 09 | 6d 61 72 67 69 6e 2d 6c |tra].{..|margin-l|
|000003b0| 65 66 74 3a 20 31 70 78 | 3b 0a 7d 0a 50 4b 03 04 |eft: 1px|;.}.PK..|
|000003c0| 0a 00 00 00 00 00 3c 9a | 41 38 00 00 00 00 00 00 |......<.|A8......|
|000003d0| 00 00 00 00 00 00 1d 00 | 15 00 63 6f 6e 74 65 6e |........|..conten|
|000003e0| 74 2f 7a 6f 74 65 72 6f | 2d 70 6c 61 74 66 6f 72 |t/zotero|-platfor|
|000003f0| 6d 2f 75 6e 69 78 2f 55 | 54 09 00 03 b4 b6 a3 47 |m/unix/U|T......G|
|00000400| b4 b6 a3 47 55 78 04 00 | 1d 09 1d 09 50 4b 03 04 |...GUx..|....PK..|
|00000410| 0a 00 00 00 00 00 03 13 | 0f 37 00 00 00 00 00 00 |........|.7......|
|00000420| 00 00 00 00 00 00 29 00 | 15 00 63 6f 6e 74 65 6e |......).|..conten|
|00000430| 74 2f 7a 6f 74 65 72 6f | 2d 70 6c 61 74 66 6f 72 |t/zotero|-platfor|
|00000440| 6d 2f 75 6e 69 78 2f 69 | 74 65 6d 50 61 6e 65 2e |m/unix/i|temPane.|
|00000450| 63 73 73 55 54 09 00 03 | 05 9c c2 46 b4 b6 a3 47 |cssUT...|...F...G|
|00000460| 55 78 04 00 1d 09 1d 09 | 50 4b 03 04 0a 00 00 00 |Ux......|PK......|
|00000470| 00 00 3c 9a 41 38 00 00 | 00 00 00 00 00 00 00 00 |..<.A8..|........|
|00000480| 00 00 1c 00 15 00 63 6f | 6e 74 65 6e 74 2f 7a 6f |......co|ntent/zo|
|00000490| 74 65 72 6f 2d 70 6c 61 | 74 66 6f 72 6d 2f 6d 61 |tero-pla|tform/ma|
|000004a0| 63 2f 55 54 09 00 03 b4 | b6 a3 47 b4 b6 a3 47 55 |c/UT....|..G...GU|
|000004b0| 78 04 00 1d 09 1d 09 50 | 4b 03 04 0a 00 00 00 00 |x......P|K.......|
|000004c0| 00 03 13 0f 37 93 06 d7 | 32 01 00 00 00 01 00 00 |....7...|2.......|
|000004d0| 00 28 00 15 00 63 6f 6e | 74 65 6e 74 2f 7a 6f 74 |.(...con|tent/zot|
|000004e0| 65 72 6f 2d 70 6c 61 74 | 66 6f 72 6d 2f 6d 61 63 |ero-plat|form/mac|
|000004f0| 2f 69 74 65 6d 50 61 6e | 65 2e 63 73 73 55 54 09 |/itemPan|e.cssUT.|
|00000500| 00 03 05 9c c2 46 b4 b6 | a3 47 55 78 04 00 1d 09 |.....F..|.GUx....|
|00000510| 1d 09 0a 50 4b 03 04 0a | 00 00 00 00 00 3c 9a 41 |...PK...|.....<.A|
|00000520| 38 00 00 00 00 00 00 00 | 00 00 00 00 00 0f 00 15 |8.......|........|
|00000530| 00 63 6f 6e 74 65 6e 74 | 2f 7a 6f 74 65 72 6f 2f |.content|/zotero/|
|00000540| 55 54 09 00 03 b4 b6 a3 | 47 b4 b6 a3 47 55 78 04 |UT......|G...GUx.|
|00000550| 00 1d 09 1d 09 50 4b 03 | 04 0a 00 00 00 00 00 cc |.....PK.|........|
|00000560| 6c 93 37 eb 68 83 6e 64 | 39 00 00 64 39 00 00 23 |l.7.h.nd|9..d9..#|
|00000570| 00 15 00 63 6f 6e 74 65 | 6e 74 2f 7a 6f 74 65 72 |...conte|nt/zoter|
|00000580| 6f 2f 61 64 64 43 69 74 | 61 74 69 6f 6e 44 69 61 |o/addCit|ationDia|
|00000590| 6c 6f 67 2e 6a 73 55 54 | 09 00 03 1f 65 69 47 b4 |log.jsUT|....eiG.|
|000005a0| b6 a3 47 55 78 04 00 1d | 09 1d 09 2f 2a 0a 20 20 |..GUx...|.../*. |
|000005b0| 20 20 2a 2a 2a 2a 2a 20 | 42 45 47 49 4e 20 4c 49 | ***** |BEGIN LI|
|000005c0| 43 45 4e 53 45 20 42 4c | 4f 43 4b 20 2a 2a 2a 2a |CENSE BL|OCK ****|
|000005d0| 2a 0a 20 20 20 20 0a 20 | 20 20 20 43 6f 70 79 72 |*. . | Copyr|
|000005e0| 69 67 68 74 20 28 63 29 | 20 32 30 30 36 20 20 43 |ight (c)| 2006 C|
|000005f0| 65 6e 74 65 72 20 66 6f | 72 20 48 69 73 74 6f 72 |enter fo|r Histor|
|00000600| 79 20 61 6e 64 20 4e 65 | 77 20 4d 65 64 69 61 0a |y and Ne|w Media.|
|00000610| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000620| 20 20 20 20 20 20 20 20 | 47 65 6f 72 67 65 20 4d | |George M|
|00000630| 61 73 6f 6e 20 55 6e 69 | 76 65 72 73 69 74 79 2c |ason Uni|versity,|
|00000640| 20 46 61 69 72 66 61 78 | 2c 20 56 69 72 67 69 6e | Fairfax|, Virgin|
|00000650| 69 61 2c 20 55 53 41 0a | 20 20 20 20 20 20 20 20 |ia, USA.| |
|00000660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000670| 68 74 74 70 3a 2f 2f 63 | 68 6e 6d 2e 67 6d 75 2e |http://c|hnm.gmu.|
|00000680| 65 64 75 0a 20 20 20 20 | 0a 20 20 20 20 4c 69 63 |edu. |. Lic|
|00000690| 65 6e 73 65 64 20 75 6e | 64 65 72 20 74 68 65 20 |ensed un|der the |
|000006a0| 45 64 75 63 61 74 69 6f | 6e 61 6c 20 43 6f 6d 6d |Educatio|nal Comm|
|000006b0| 75 6e 69 74 79 20 4c 69 | 63 65 6e 73 65 2c 20 56 |unity Li|cense, V|
|000006c0| 65 72 73 69 6f 6e 20 31 | 2e 30 20 28 74 68 65 20 |ersion 1|.0 (the |
|000006d0| 22 4c 69 63 65 6e 73 65 | 22 29 3b 0a 20 20 20 20 |"License|");. |
|000006e0| 79 6f 75 20 6d 61 79 20 | 6e 6f 74 20 75 73 65 20 |you may |not use |
|000006f0| 74 68 69 73 20 66 69 6c | 65 20 65 78 63 65 70 74 |this fil|e except|
|00000700| 20 69 6e 20 63 6f 6d 70 | 6c 69 61 6e 63 65 20 77 | in comp|liance w|
|00000710| 69 74 68 20 74 68 65 20 | 4c 69 63 65 6e 73 65 2e |ith the |License.|
|00000720| 0a 20 20 20 20 59 6f 75 | 20 6d 61 79 20 6f 62 74 |. You| may obt|
|00000730| 61 69 6e 20 61 20 63 6f | 70 79 20 6f 66 20 74 68 |ain a co|py of th|
|00000740| 65 20 4c 69 63 65 6e 73 | 65 20 61 74 0a 20 20 20 |e Licens|e at. |
|00000750| 20 0a 20 20 20 20 68 74 | 74 70 3a 2f 2f 77 77 77 | . ht|tp://www|
|00000760| 2e 6f 70 65 6e 73 6f 75 | 72 63 65 2e 6f 72 67 2f |.opensou|rce.org/|
|00000770| 6c 69 63 65 6e 73 65 73 | 2f 65 63 6c 31 2e 70 68 |licenses|/ecl1.ph|
|00000780| 70 0a 20 20 20 20 0a 20 | 20 20 20 55 6e 6c 65 73 |p. . | Unles|
|00000790| 73 20 72 65 71 75 69 72 | 65 64 20 62 79 20 61 70 |s requir|ed by ap|
|000007a0| 70 6c 69 63 61 62 6c 65 | 20 6c 61 77 20 6f 72 20 |plicable| law or |
|000007b0| 61 67 72 65 65 64 20 74 | 6f 20 69 6e 20 77 72 69 |agreed t|o in wri|
|000007c0| 74 69 6e 67 2c 20 73 6f | 66 74 77 61 72 65 0a 20 |ting, so|ftware. |
|000007d0| 20 20 20 64 69 73 74 72 | 69 62 75 74 65 64 20 75 | distr|ibuted u|
|000007e0| 6e 64 65 72 20 74 68 65 | 20 4c 69 63 65 6e 73 65 |nder the| License|
|000007f0| 20 69 73 20 64 69 73 74 | 72 69 62 75 74 65 64 20 | is dist|ributed |
|00000800| 6f 6e 20 61 6e 20 22 41 | 53 20 49 53 22 20 42 41 |on an "A|S IS" BA|
|00000810| 53 49 53 2c 0a 20 20 20 | 20 57 49 54 48 4f 55 54 |SIS,. | WITHOUT|
|00000820| 20 57 41 52 52 41 4e 54 | 49 45 53 20 4f 52 20 43 | WARRANT|IES OR C|
|00000830| 4f 4e 44 49 54 49 4f 4e | 53 20 4f 46 20 41 4e 59 |ONDITION|S OF ANY|
|00000840| 20 4b 49 4e 44 2c 20 65 | 69 74 68 65 72 20 65 78 | KIND, e|ither ex|
|00000850| 70 72 65 73 73 20 6f 72 | 20 69 6d 70 6c 69 65 64 |press or| implied|
|00000860| 2e 0a 20 20 20 20 53 65 | 65 20 74 68 65 20 4c 69 |.. Se|e the Li|
|00000870| 63 65 6e 73 65 20 66 6f | 72 20 74 68 65 20 73 70 |cense fo|r the sp|
|00000880| 65 63 69 66 69 63 20 6c | 61 6e 67 75 61 67 65 20 |ecific l|anguage |
|00000890| 67 6f 76 65 72 6e 69 6e | 67 20 70 65 72 6d 69 73 |governin|g permis|
|000008a0| 73 69 6f 6e 73 20 61 6e | 64 0a 20 20 20 20 6c 69 |sions an|d. li|
|000008b0| 6d 69 74 61 74 69 6f 6e | 73 20 75 6e 64 65 72 20 |mitation|s under |
|000008c0| 74 68 65 20 4c 69 63 65 | 6e 73 65 2e 0a 20 20 20 |the Lice|nse.. |
|000008d0| 20 0a 20 20 20 20 2a 2a | 2a 2a 2a 20 45 4e 44 20 | . **|*** END |
|000008e0| 4c 49 43 45 4e 53 45 20 | 42 4c 4f 43 4b 20 2a 2a |LICENSE |BLOCK **|
|000008f0| 2a 2a 2a 0a 2a 2f 0a 0a | 76 61 72 20 5a 6f 74 65 |***.*/..|var Zote|
|00000900| 72 6f 5f 43 69 74 61 74 | 69 6f 6e 5f 44 69 61 6c |ro_Citat|ion_Dial|
|00000910| 6f 67 20 3d 20 6e 65 77 | 20 66 75 6e 63 74 69 6f |og = new| functio|
|00000920| 6e 20 28 29 20 7b 0a 09 | 76 61 72 20 5f 70 72 65 |n () {..|var _pre|
|00000930| 73 65 72 76 65 44 61 74 | 61 20 3d 20 7b 0a 09 09 |serveDat|a = {...|
|00000940| 22 70 72 65 66 69 78 22 | 3a 22 76 61 6c 75 65 22 |"prefix"|:"value"|
|00000950| 2c 0a 09 09 22 73 75 66 | 66 69 78 22 3a 22 76 61 |,..."suf|fix":"va|
|00000960| 6c 75 65 22 2c 0a 09 09 | 22 6c 6f 63 61 74 6f 72 |lue",...|"locator|
|00000970| 54 79 70 65 22 3a 22 73 | 65 6c 65 63 74 65 64 49 |Type":"s|electedI|
|00000980| 6e 64 65 78 22 2c 0a 09 | 09 22 6c 6f 63 61 74 6f |ndex",..|."locato|
|00000990| 72 22 3a 22 76 61 6c 75 | 65 22 2c 0a 09 09 22 73 |r":"valu|e",..."s|
|000009a0| 75 70 70 72 65 73 73 41 | 75 74 68 6f 72 22 3a 22 |uppressA|uthor":"|
|000009b0| 63 68 65 63 6b 65 64 22 | 0a 09 7d 3b 0a 09 0a 09 |checked"|..};....|
|000009c0| 76 61 72 20 5f 69 74 65 | 6d 44 61 74 61 20 3d 20 |var _ite|mData = |
|000009d0| 6e 65 77 20 4f 62 6a 65 | 63 74 28 29 3b 0a 09 76 |new Obje|ct();..v|
|000009e0| 61 72 20 5f 6d 75 6c 74 | 69 70 6c 65 53 6f 75 72 |ar _mult|ipleSour|
|000009f0| 63 65 73 4f 6e 20 3d 20 | 66 61 6c 73 65 3b 0a 09 |cesOn = |false;..|
|00000a00| 76 61 72 20 5f 6c 61 73 | 74 53 65 6c 65 63 74 65 |var _las|tSelecte|
|00000a10| 64 20 3d 20 6e 75 6c 6c | 3b 0a 09 76 61 72 20 5f |d = null|;..var _|
|00000a20| 70 72 65 76 69 65 77 53 | 68 6f 77 6e 20 3d 20 66 |previewS|hown = f|
|00000a30| 61 6c 73 65 3b 0a 09 76 | 61 72 20 5f 73 75 70 70 |alse;..v|ar _supp|
|00000a40| 72 65 73 73 4e 65 78 74 | 54 72 65 65 53 65 6c 65 |ressNext|TreeSele|
|00000a50| 63 74 20 3d 20 66 61 6c | 73 65 3b 0a 09 76 61 72 |ct = fal|se;..var|
|00000a60| 20 5f 6c 6f 63 61 74 6f | 72 49 6e 64 65 78 41 72 | _locato|rIndexAr|
|00000a70| 72 61 79 20 3d 20 7b 7d | 3b 0a 09 76 61 72 20 5f |ray = {}|;..var _|
|00000a80| 61 75 74 6f 52 65 67 65 | 6e 65 72 61 74 65 50 72 |autoRege|neratePr|
|00000a90| 65 66 3b 0a 09 76 61 72 | 20 5f 61 63 63 65 70 74 |ef;..var| _accept|
|00000aa0| 42 75 74 74 6f 6e 3b 0a | 09 76 61 72 20 5f 73 6f |Button;.|.var _so|
|00000ab0| 72 74 43 68 65 63 6b 62 | 6f 78 3b 0a 09 76 61 72 |rtCheckb|ox;..var|
|00000ac0| 20 5f 6f 72 69 67 69 6e | 61 6c 48 54 4d 4c 3b 0a | _origin|alHTML;.|
|00000ad0| 09 76 61 72 20 69 6f 3b | 0a 09 0a 09 74 68 69 73 |.var io;|....this|
|00000ae0| 2e 6c 6f 61 64 20 3d 20 | 6c 6f 61 64 3b 0a 09 74 |.load = |load;..t|
|00000af0| 68 69 73 2e 74 6f 67 67 | 6c 65 4d 75 6c 74 69 70 |his.togg|leMultip|
|00000b00| 6c 65 53 6f 75 72 63 65 | 73 20 3d 20 74 6f 67 67 |leSource|s = togg|
|00000b10| 6c 65 4d 75 6c 74 69 70 | 6c 65 53 6f 75 72 63 65 |leMultip|leSource|
|00000b20| 73 3b 0a 09 74 68 69 73 | 2e 74 6f 67 67 6c 65 45 |s;..this|.toggleE|
|00000b30| 64 69 74 6f 72 20 3d 20 | 74 6f 67 67 6c 65 45 64 |ditor = |toggleEd|
|00000b40| 69 74 6f 72 3b 0a 09 74 | 68 69 73 2e 74 72 65 65 |itor;..t|his.tree|
|00000b50| 49 74 65 6d 53 65 6c 65 | 63 74 65 64 20 3d 20 74 |ItemSele|cted = t|
|00000b60| 72 65 65 49 74 65 6d 53 | 65 6c 65 63 74 65 64 3b |reeItemS|elected;|
|00000b70| 0a 09 74 68 69 73 2e 6c | 69 73 74 49 74 65 6d 53 |..this.l|istItemS|
|00000b80| 65 6c 65 63 74 65 64 20 | 3d 20 6c 69 73 74 49 74 |elected |= listIt|
|00000b90| 65 6d 53 65 6c 65 63 74 | 65 64 3b 0a 09 74 68 69 |emSelect|ed;..thi|
|00000ba0| 73 2e 61 64 64 20 3d 20 | 61 64 64 3b 0a 09 74 68 |s.add = |add;..th|
|00000bb0| 69 73 2e 72 65 6d 6f 76 | 65 20 3d 20 72 65 6d 6f |is.remov|e = remo|
|00000bc0| 76 65 3b 0a 09 74 68 69 | 73 2e 73 6f 72 74 43 69 |ve;..thi|s.sortCi|
|00000bd0| 74 61 74 69 6f 6e 20 3d | 20 73 6f 72 74 43 69 74 |tation =| sortCit|
|00000be0| 61 74 69 6f 6e 3b 0a 09 | 74 68 69 73 2e 63 6f 6e |ation;..|this.con|
|00000bf0| 66 69 72 6d 52 65 67 65 | 6e 65 72 61 74 65 20 3d |firmRege|nerate =|
|00000c00| 20 63 6f 6e 66 69 72 6d | 52 65 67 65 6e 65 72 61 | confirm|Regenera|
|00000c10| 74 65 3b 0a 09 74 68 69 | 73 2e 61 63 63 65 70 74 |te;..thi|s.accept|
|00000c20| 20 3d 20 61 63 63 65 70 | 74 3b 0a 09 74 68 69 73 | = accep|t;..this|
|00000c30| 2e 63 61 6e 63 65 6c 20 | 3d 20 63 61 6e 63 65 6c |.cancel |= cancel|
|00000c40| 3b 0a 09 0a 09 2f 2a 0a | 09 20 2a 20 69 6e 69 74 |;..../*.|. * init|
|00000c50| 69 61 6c 69 7a 65 20 61 | 64 64 20 63 69 74 61 74 |ialize a|dd citat|
|00000c60| 69 6f 6e 20 64 69 61 6c | 6f 67 0a 09 20 2a 2f 0a |ion dial|og.. */.|
|00000c70| 09 66 75 6e 63 74 69 6f | 6e 20 6c 6f 61 64 28 29 |.functio|n load()|
|00000c80| 20 7b 0a 09 09 64 6f 63 | 75 6d 65 6e 74 2e 67 65 | {...doc|ument.ge|
|00000c90| 74 45 6c 65 6d 65 6e 74 | 42 79 49 64 28 22 6d 75 |tElement|ById("mu|
|00000ca0| 6c 74 69 70 6c 65 2d 73 | 6f 75 72 63 65 73 2d 62 |ltiple-s|ources-b|
|00000cb0| 75 74 74 6f 6e 22 29 2e | 6c 61 62 65 6c 20 3d 20 |utton").|label = |
|00000cc0| 5a 6f 74 65 72 6f 2e 67 | 65 74 53 74 72 69 6e 67 |Zotero.g|etString|
|00000cd0| 28 22 63 69 74 61 74 69 | 6f 6e 2e 6d 75 6c 74 69 |("citati|on.multi|
|00000ce0| 70 6c 65 53 6f 75 72 63 | 65 73 22 29 3b 0a 09 09 |pleSourc|es");...|
|00000cf0| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00000d00| 65 6e 74 42 79 49 64 28 | 22 73 68 6f 77 2d 65 64 |entById(|"show-ed|
|00000d10| 69 74 6f 72 2d 62 75 74 | 74 6f 6e 22 29 2e 6c 61 |itor-but|ton").la|
|00000d20| 62 65 6c 20 3d 20 5a 6f | 74 65 72 6f 2e 67 65 74 |bel = Zo|tero.get|
|00000d30| 53 74 72 69 6e 67 28 22 | 63 69 74 61 74 69 6f 6e |String("|citation|
|00000d40| 2e 73 68 6f 77 45 64 69 | 74 6f 72 22 29 3b 0a 09 |.showEdi|tor");..|
|00000d50| 09 0a 09 09 69 66 28 5a | 6f 74 65 72 6f 2e 69 73 |....if(Z|otero.is|
|00000d60| 57 69 6e 29 20 7b 0a 09 | 09 09 64 6f 63 75 6d 65 |Win) {..|..docume|
|00000d70| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|00000d80| 64 28 22 7a 6f 74 65 72 | 6f 2d 73 65 6c 65 63 74 |d("zoter|o-select|
|00000d90| 2d 69 74 65 6d 73 2d 63 | 6f 6e 74 61 69 6e 65 72 |-items-c|ontainer|
|00000da0| 22 29 2e 73 74 79 6c 65 | 2e 62 6f 72 64 65 72 20 |").style|.border |
|00000db0| 3d 20 22 31 70 78 20 73 | 6f 6c 69 64 20 62 6c 61 |= "1px s|olid bla|
|00000dc0| 63 6b 22 3b 0a 09 09 7d | 0a 09 09 69 6f 20 3d 20 |ck";...}|...io = |
|00000dd0| 77 69 6e 64 6f 77 2e 61 | 72 67 75 6d 65 6e 74 73 |window.a|rguments|
|00000de0| 5b 30 5d 2e 77 72 61 70 | 70 65 64 4a 53 4f 62 6a |[0].wrap|pedJSObj|
|00000df0| 65 63 74 3b 0a 09 09 0a | 09 09 2f 2f 20 66 69 6e |ect;....|..// fin|
|00000e00| 64 20 61 63 63 65 70 74 | 20 62 75 74 74 6f 6e 0a |d accept| button.|
|00000e10| 09 09 5f 61 63 63 65 70 | 74 42 75 74 74 6f 6e 20 |.._accep|tButton |
|00000e20| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c |= docume|nt.getEl|
|00000e30| 65 6d 65 6e 74 42 79 49 | 64 28 22 61 64 64 2d 63 |ementByI|d("add-c|
|00000e40| 69 74 61 74 69 6f 6e 2d | 64 69 61 6c 6f 67 22 29 |itation-|dialog")|
|00000e50| 2e 67 65 74 42 75 74 74 | 6f 6e 28 22 61 63 63 65 |.getButt|on("acce|
|00000e60| 70 74 22 29 3b 0a 09 09 | 5f 61 75 74 6f 52 65 67 |pt");...|_autoReg|
|00000e70| 65 6e 65 72 61 74 65 50 | 72 65 66 20 3d 20 5a 6f |enerateP|ref = Zo|
|00000e80| 74 65 72 6f 2e 50 72 65 | 66 73 2e 67 65 74 28 22 |tero.Pre|fs.get("|
|00000e90| 69 6e 74 65 67 72 61 74 | 69 6f 6e 2e 61 75 74 6f |integrat|ion.auto|
|00000ea0| 52 65 67 65 6e 65 72 61 | 74 65 22 29 3b 0a 09 09 |Regenera|te");...|
|00000eb0| 0a 09 09 2f 2f 20 69 66 | 20 61 20 73 74 79 6c 65 |...// if| a style|
|00000ec0| 20 77 69 74 68 20 73 6f | 72 74 61 62 6c 65 20 63 | with so|rtable c|
|00000ed0| 69 74 61 74 69 6f 6e 73 | 2c 20 70 72 65 73 65 6e |itations|, presen|
|00000ee0| 74 20 63 68 65 63 6b 62 | 6f 78 0a 09 09 69 66 28 |t checkb|ox...if(|
|00000ef0| 69 6f 2e 63 69 74 61 74 | 69 6f 6e 2e 73 6f 72 74 |io.citat|ion.sort|
|00000f00| 61 62 6c 65 29 20 7b 0a | 09 09 09 5f 73 6f 72 74 |able) {.|..._sort|
|00000f10| 43 68 65 63 6b 62 6f 78 | 20 3d 20 64 6f 63 75 6d |Checkbox| = docum|
|00000f20| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00000f30| 49 64 28 22 6b 65 65 70 | 53 6f 72 74 65 64 22 29 |Id("keep|Sorted")|
|00000f40| 3b 0a 09 09 09 5f 73 6f | 72 74 43 68 65 63 6b 62 |;...._so|rtCheckb|
|00000f50| 6f 78 2e 68 69 64 64 65 | 6e 20 3d 20 66 61 6c 73 |ox.hidde|n = fals|
|00000f60| 65 3b 0a 09 09 09 5f 73 | 6f 72 74 43 68 65 63 6b |e;...._s|ortCheck|
|00000f70| 62 6f 78 2e 63 68 65 63 | 6b 65 64 20 3d 20 74 72 |box.chec|ked = tr|
|00000f80| 75 65 3b 0a 09 09 09 69 | 6f 2e 63 69 74 61 74 69 |ue;....i|o.citati|
|00000f90| 6f 6e 2e 70 72 6f 70 65 | 72 74 69 65 73 2e 73 6f |on.prope|rties.so|
|00000fa0| 72 74 20 3d 20 74 72 75 | 65 3b 0a 09 09 7d 0a 09 |rt = tru|e;...}..|
|00000fb0| 09 0a 09 09 2f 2f 20 6c | 6f 61 64 20 6c 6f 63 61 |....// l|oad loca|
|00000fc0| 74 6f 72 73 0a 09 09 76 | 61 72 20 6c 6f 63 61 74 |tors...v|ar locat|
|00000fd0| 6f 72 73 20 3d 20 5a 6f | 74 65 72 6f 2e 43 53 4c |ors = Zo|tero.CSL|
|00000fe0| 2e 47 6c 6f 62 61 6c 2e | 67 65 74 4c 6f 63 61 74 |.Global.|getLocat|
|00000ff0| 6f 72 53 74 72 69 6e 67 | 73 28 29 3b 0a 09 09 76 |orString|s();...v|
|00001000| 61 72 20 6d 65 6e 75 20 | 3d 20 64 6f 63 75 6d 65 |ar menu |= docume|
|00001010| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|00001020| 64 28 22 6c 6f 63 61 74 | 6f 72 54 79 70 65 22 29 |d("locat|orType")|
|00001030| 3b 0a 09 09 76 61 72 20 | 70 6f 70 75 70 20 3d 20 |;...var |popup = |
|00001040| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00001050| 65 6e 74 42 79 49 64 28 | 22 6c 6f 63 61 74 6f 72 |entById(|"locator|
|00001060| 2d 74 79 70 65 2d 70 6f | 70 75 70 22 29 3b 0a 09 |-type-po|pup");..|
|00001070| 09 76 61 72 20 69 20 3d | 20 30 3b 0a 09 09 66 6f |.var i =| 0;...fo|
|00001080| 72 28 76 61 72 20 76 61 | 6c 75 65 20 69 6e 20 6c |r(var va|lue in l|
|00001090| 6f 63 61 74 6f 72 73 29 | 20 7b 0a 09 09 09 76 61 |ocators)| {....va|
|000010a0| 72 20 6c 6f 63 61 74 6f | 72 20 3d 20 6c 6f 63 61 |r locato|r = loca|
|000010b0| 74 6f 72 73 5b 76 61 6c | 75 65 5d 3b 0a 09 09 09 |tors[val|ue];....|
|000010c0| 6c 6f 63 61 74 6f 72 20 | 3d 20 6c 6f 63 61 74 6f |locator |= locato|
|000010d0| 72 5b 30 5d 2e 74 6f 55 | 70 70 65 72 43 61 73 65 |r[0].toU|pperCase|
|000010e0| 28 29 2b 6c 6f 63 61 74 | 6f 72 2e 73 75 62 73 74 |()+locat|or.subst|
|000010f0| 72 28 31 29 3b 0a 09 09 | 09 2f 2f 20 61 64 64 20 |r(1);...|.// add |
|00001100| 74 6f 20 70 6f 70 75 70 | 0a 09 09 09 76 61 72 20 |to popup|....var |
|00001110| 63 68 69 6c 64 20 3d 20 | 64 6f 63 75 6d 65 6e 74 |child = |document|
|00001120| 2e 63 72 65 61 74 65 45 | 6c 65 6d 65 6e 74 28 22 |.createE|lement("|
|00001130| 6d 65 6e 75 69 74 65 6d | 22 29 3b 0a 09 09 09 63 |menuitem|");....c|
|00001140| 68 69 6c 64 2e 73 65 74 | 41 74 74 72 69 62 75 74 |hild.set|Attribut|
|00001150| 65 28 22 76 61 6c 75 65 | 22 2c 20 76 61 6c 75 65 |e("value|", value|
|00001160| 29 3b 0a 09 09 09 63 68 | 69 6c 64 2e 73 65 74 41 |);....ch|ild.setA|
|00001170| 74 74 72 69 62 75 74 65 | 28 22 6c 61 62 65 6c 22 |ttribute|("label"|
|00001180| 2c 20 6c 6f 63 61 74 6f | 72 29 3b 0a 09 09 09 70 |, locato|r);....p|
|00001190| 6f 70 75 70 2e 61 70 70 | 65 6e 64 43 68 69 6c 64 |opup.app|endChild|
|000011a0| 28 63 68 69 6c 64 29 3b | 0a 09 09 09 2f 2f 20 61 |(child);|....// a|
|000011b0| 64 64 20 74 6f 20 61 72 | 72 61 79 0a 09 09 09 5f |dd to ar|ray...._|
|000011c0| 6c 6f 63 61 74 6f 72 49 | 6e 64 65 78 41 72 72 61 |locatorI|ndexArra|
|000011d0| 79 5b 76 61 6c 75 65 5d | 20 3d 20 69 3b 0a 09 09 |y[value]| = i;...|
|000011e0| 09 69 2b 2b 3b 0a 09 09 | 7d 0a 09 09 6d 65 6e 75 |.i++;...|}...menu|
|000011f0| 2e 73 65 6c 65 63 74 65 | 64 49 6e 64 65 78 20 3d |.selecte|dIndex =|
|00001200| 20 30 3b 0a 09 09 0a 09 | 09 2f 2f 20 6c 6f 61 64 | 0;.....|.// load|
|00001210| 20 28 66 72 6f 6d 20 73 | 65 6c 65 63 74 49 74 65 | (from s|electIte|
|00001220| 6d 73 44 69 61 6c 6f 67 | 2e 6a 73 29 0a 09 09 64 |msDialog|.js)...d|
|00001230| 6f 4c 6f 61 64 28 29 3b | 0a 09 09 0a 09 09 2f 2f |oLoad();|......//|
|00001240| 20 69 66 20 77 65 20 61 | 6c 72 65 61 64 79 20 68 | if we a|lready h|
|00001250| 61 76 65 20 61 20 63 69 | 74 61 74 69 6f 6e 2c 20 |ave a ci|tation, |
|00001260| 6c 6f 61 64 20 64 61 74 | 61 20 66 72 6f 6d 20 69 |load dat|a from i|
|00001270| 74 0a 09 09 64 6f 63 75 | 6d 65 6e 74 2e 67 65 74 |t...docu|ment.get|
|00001280| 45 6c 65 6d 65 6e 74 42 | 79 49 64 28 27 65 64 69 |ElementB|yId('edi|
|00001290| 74 6f 72 27 29 2e 66 6f | 72 6d 61 74 20 3d 20 22 |tor').fo|rmat = "|
|000012a0| 49 6e 74 65 67 72 61 74 | 69 6f 6e 22 3b 0a 09 09 |Integrat|ion";...|
|000012b0| 69 66 28 69 6f 2e 63 69 | 74 61 74 69 6f 6e 2e 63 |if(io.ci|tation.c|
|000012c0| 69 74 61 74 69 6f 6e 49 | 74 65 6d 73 2e 6c 65 6e |itationI|tems.len|
|000012d0| 67 74 68 29 20 7b 0a 09 | 09 09 69 66 28 69 6f 2e |gth) {..|..if(io.|
|000012e0| 63 69 74 61 74 69 6f 6e | 2e 63 69 74 61 74 69 6f |citation|.citatio|
|000012f0| 6e 49 74 65 6d 73 2e 6c | 65 6e 67 74 68 20 3d 3d |nItems.l|ength ==|
|00001300| 20 31 29 20 7b 0a 09 09 | 09 09 2f 2f 20 73 69 6e | 1) {...|..// sin|
|00001310| 67 6c 65 20 63 69 74 61 | 74 69 6f 6e 0a 09 09 09 |gle cita|tion....|
|00001320| 09 5f 73 75 70 70 72 65 | 73 73 4e 65 78 74 54 72 |._suppre|ssNextTr|
|00001330| 65 65 53 65 6c 65 63 74 | 20 3d 20 74 72 75 65 3b |eeSelect| = true;|
|00001340| 0a 09 09 09 09 69 74 65 | 6d 73 56 69 65 77 2e 73 |.....ite|msView.s|
|00001350| 65 6c 65 63 74 49 74 65 | 6d 28 69 6f 2e 63 69 74 |electIte|m(io.cit|
|00001360| 61 74 69 6f 6e 2e 63 69 | 74 61 74 69 6f 6e 49 74 |ation.ci|tationIt|
|00001370| 65 6d 73 5b 30 5d 2e 69 | 74 65 6d 49 44 29 3b 09 |ems[0].i|temID);.|
|00001380| 20 2f 2f 20 74 72 65 65 | 76 69 65 77 20 66 72 6f | // tree|view fro|
|00001390| 6d 20 73 65 6c 65 63 74 | 49 74 65 6d 73 44 69 61 |m select|ItemsDia|
|000013a0| 6c 6f 67 2e 6a 73 0a 09 | 09 09 09 66 6f 72 28 76 |log.js..|...for(v|
|000013b0| 61 72 20 70 72 6f 70 65 | 72 74 79 20 69 6e 20 5f |ar prope|rty in _|
|000013c0| 70 72 65 73 65 72 76 65 | 44 61 74 61 29 20 7b 0a |preserve|Data) {.|
|000013d0| 09 09 09 09 09 69 66 28 | 69 6f 2e 63 69 74 61 74 |.....if(|io.citat|
|000013e0| 69 6f 6e 2e 63 69 74 61 | 74 69 6f 6e 49 74 65 6d |ion.cita|tionItem|
|000013f0| 73 5b 30 5d 5b 70 72 6f | 70 65 72 74 79 5d 29 20 |s[0][pro|perty]) |
|00001400| 7b 0a 09 09 09 09 09 09 | 69 66 28 70 72 6f 70 65 |{.......|if(prope|
|00001410| 72 74 79 20 3d 3d 20 22 | 6c 6f 63 61 74 6f 72 54 |rty == "|locatorT|
|00001420| 79 70 65 22 29 20 7b 0a | 09 09 09 09 09 09 09 64 |ype") {.|.......d|
|00001430| 6f 63 75 6d 65 6e 74 2e | 67 65 74 45 6c 65 6d 65 |ocument.|getEleme|
|00001440| 6e 74 42 79 49 64 28 70 | 72 6f 70 65 72 74 79 29 |ntById(p|roperty)|
|00001450| 5b 5f 70 72 65 73 65 72 | 76 65 44 61 74 61 5b 70 |[_preser|veData[p|
|00001460| 72 6f 70 65 72 74 79 5d | 5d 20 3d 20 5f 6c 6f 63 |roperty]|] = _loc|
|00001470| 61 74 6f 72 49 6e 64 65 | 78 41 72 72 61 79 5b 69 |atorInde|xArray[i|
|00001480| 6f 2e 63 69 74 61 74 69 | 6f 6e 2e 63 69 74 61 74 |o.citati|on.citat|
|00001490| 69 6f 6e 49 74 65 6d 73 | 5b 30 5d 5b 70 72 6f 70 |ionItems|[0][prop|
|000014a0| 65 72 74 79 5d 5d 3b 0a | 09 09 09 09 09 09 7d 20 |erty]];.|......} |
|000014b0| 65 6c 73 65 20 7b 0a 09 | 09 09 09 09 09 09 64 6f |else {..|......do|
|000014c0| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|000014d0| 74 42 79 49 64 28 70 72 | 6f 70 65 72 74 79 29 5b |tById(pr|operty)[|
|000014e0| 5f 70 72 65 73 65 72 76 | 65 44 61 74 61 5b 70 72 |_preserv|eData[pr|
|000014f0| 6f 70 65 72 74 79 5d 5d | 20 3d 20 69 6f 2e 63 69 |operty]]| = io.ci|
|00001500| 74 61 74 69 6f 6e 2e 63 | 69 74 61 74 69 6f 6e 49 |tation.c|itationI|
|00001510| 74 65 6d 73 5b 30 5d 5b | 70 72 6f 70 65 72 74 79 |tems[0][|property|
|00001520| 5d 3b 0a 09 09 09 09 09 | 09 7d 0a 09 09 09 09 09 |];......|.}......|
|00001530| 7d 0a 09 09 09 09 7d 0a | 09 09 09 7d 20 65 6c 73 |}.....}.|...} els|
|00001540| 65 20 7b 0a 09 09 09 09 | 2f 2f 20 6d 75 6c 74 69 |e {.....|// multi|
|00001550| 70 6c 65 20 63 69 74 61 | 74 69 6f 6e 73 0a 09 09 |ple cita|tions...|
|00001560| 09 09 74 6f 67 67 6c 65 | 4d 75 6c 74 69 70 6c 65 |..toggle|Multiple|
|00001570| 53 6f 75 72 63 65 73 28 | 29 3b 0a 09 09 09 09 66 |Sources(|);.....f|
|00001580| 6f 72 28 76 61 72 20 69 | 3d 30 3b 20 69 3c 69 6f |or(var i|=0; i<io|
|00001590| 2e 63 69 74 61 74 69 6f | 6e 2e 63 69 74 61 74 69 |.citatio|n.citati|
|000015a0| 6f 6e 49 74 65 6d 73 2e | 6c 65 6e 67 74 68 3b 20 |onItems.|length; |
|000015b0| 69 2b 2b 29 20 7b 0a 09 | 09 09 09 09 76 61 72 20 |i++) {..|....var |
|000015c0| 69 74 65 6d 20 3d 20 5a | 6f 74 65 72 6f 2e 49 74 |item = Z|otero.It|
|000015d0| 65 6d 73 2e 67 65 74 28 | 69 6f 2e 63 69 74 61 74 |ems.get(|io.citat|
|000015e0| 69 6f 6e 2e 63 69 74 61 | 74 69 6f 6e 49 74 65 6d |ion.cita|tionItem|
|000015f0| 73 5b 69 5d 2e 69 74 65 | 6d 49 44 29 3b 0a 09 09 |s[i].ite|mID);...|
|00001600| 09 09 09 69 66 28 69 74 | 65 6d 29 20 7b 0a 09 09 |...if(it|em) {...|
|00001610| 09 09 09 09 5f 61 64 64 | 49 74 65 6d 28 69 74 65 |...._add|Item(ite|
|00001620| 6d 29 3b 0a 09 09 09 09 | 09 09 5f 69 74 65 6d 44 |m);.....|.._itemD|
|00001630| 61 74 61 5b 69 6f 2e 63 | 69 74 61 74 69 6f 6e 2e |ata[io.c|itation.|
|00001640| 63 69 74 61 74 69 6f 6e | 49 74 65 6d 73 5b 69 5d |citation|Items[i]|
|00001650| 2e 69 74 65 6d 49 44 5d | 20 3d 20 69 6f 2e 63 69 |.itemID]| = io.ci|
|00001660| 74 61 74 69 6f 6e 2e 63 | 69 74 61 74 69 6f 6e 49 |tation.c|itationI|
|00001670| 74 65 6d 73 5b 69 5d 3b | 0a 09 09 09 09 09 7d 0a |tems[i];|......}.|
|00001680| 09 09 09 09 7d 0a 09 09 | 09 7d 0a 09 09 09 0a 09 |....}...|.}......|
|00001690| 09 09 2f 2f 20 73 68 6f | 77 20 75 73 65 72 2d 65 |..// sho|w user-e|
|000016a0| 64 69 74 61 62 6c 65 20 | 65 64 69 74 65 64 20 63 |ditable |edited c|
|000016b0| 69 74 61 74 69 6f 6e 0a | 09 09 09 69 66 28 69 6f |itation.|...if(io|
|000016c0| 2e 63 69 74 61 74 69 6f | 6e 2e 70 72 6f 70 65 72 |.citatio|n.proper|
|000016d0| 74 69 65 73 2e 63 75 73 | 74 6f 6d 29 20 7b 0a 09 |ties.cus|tom) {..|
|000016e0| 09 09 09 74 6f 67 67 6c | 65 45 64 69 74 6f 72 28 |...toggl|eEditor(|
|000016f0| 69 6f 2e 63 69 74 61 74 | 69 6f 6e 2e 70 72 6f 70 |io.citat|ion.prop|
|00001700| 65 72 74 69 65 73 2e 63 | 75 73 74 6f 6d 29 3b 0a |erties.c|ustom);.|
|00001710| 09 09 09 09 69 6f 2e 63 | 69 74 61 74 69 6f 6e 2e |....io.c|itation.|
|00001720| 70 72 6f 70 65 72 74 69 | 65 73 2e 63 75 73 74 6f |properti|es.custo|
|00001730| 6d 20 3d 20 75 6e 64 65 | 66 69 6e 65 64 3b 0a 09 |m = unde|fined;..|
|00001740| 09 09 7d 0a 09 09 09 0a | 09 09 09 5f 75 70 64 61 |..}.....|..._upda|
|00001750| 74 65 41 63 63 65 70 74 | 28 29 3b 0a 09 09 7d 0a |teAccept|();...}.|
|00001760| 09 7d 0a 09 0a 09 2f 2a | 0a 09 20 2a 20 74 75 72 |.}..../*|.. * tur|
|00001770| 6e 20 6f 6e 2f 6f 66 66 | 20 6d 75 6c 74 69 70 6c |n on/off| multipl|
|00001780| 65 20 73 6f 75 72 63 65 | 73 20 69 74 65 6d 20 6c |e source|s item l|
|00001790| 69 73 74 0a 09 20 2a 2f | 0a 09 66 75 6e 63 74 69 |ist.. */|..functi|
|000017a0| 6f 6e 20 74 6f 67 67 6c | 65 4d 75 6c 74 69 70 6c |on toggl|eMultipl|
|000017b0| 65 53 6f 75 72 63 65 73 | 28 29 20 7b 0a 09 09 5f |eSources|() {..._|
|000017c0| 6d 75 6c 74 69 70 6c 65 | 53 6f 75 72 63 65 73 4f |multiple|SourcesO|
|000017d0| 6e 20 3d 20 21 5f 6d 75 | 6c 74 69 70 6c 65 53 6f |n = !_mu|ltipleSo|
|000017e0| 75 72 63 65 73 4f 6e 3b | 0a 09 09 69 66 28 5f 6d |urcesOn;|...if(_m|
|000017f0| 75 6c 74 69 70 6c 65 53 | 6f 75 72 63 65 73 4f 6e |ultipleS|ourcesOn|
|00001800| 29 20 7b 0a 09 09 09 64 | 6f 63 75 6d 65 6e 74 2e |) {....d|ocument.|
|00001810| 67 65 74 45 6c 65 6d 65 | 6e 74 42 79 49 64 28 22 |getEleme|ntById("|
|00001820| 6d 75 6c 74 69 70 6c 65 | 2d 73 6f 75 72 63 65 73 |multiple|-sources|
|00001830| 22 29 2e 68 69 64 64 65 | 6e 20 3d 20 75 6e 64 65 |").hidde|n = unde|
|00001840| 66 69 6e 65 64 3b 0a 09 | 09 09 64 6f 63 75 6d 65 |fined;..|..docume|
|00001850| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|00001860| 64 28 22 61 64 64 2d 63 | 69 74 61 74 69 6f 6e 2d |d("add-c|itation-|
|00001870| 64 69 61 6c 6f 67 22 29 | 2e 77 69 64 74 68 20 3d |dialog")|.width =|
|00001880| 20 22 37 35 30 22 3b 0a | 09 09 09 64 6f 63 75 6d | "750";.|...docum|
|00001890| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|000018a0| 49 64 28 22 6d 75 6c 74 | 69 70 6c 65 2d 73 6f 75 |Id("mult|iple-sou|
|000018b0| 72 63 65 73 2d 62 75 74 | 74 6f 6e 22 29 2e 6c 61 |rces-but|ton").la|
|000018c0| 62 65 6c 20 3d 20 5a 6f | 74 65 72 6f 2e 67 65 74 |bel = Zo|tero.get|
|000018d0| 53 74 72 69 6e 67 28 22 | 63 69 74 61 74 69 6f 6e |String("|citation|
|000018e0| 2e 73 69 6e 67 6c 65 53 | 6f 75 72 63 65 22 29 3b |.singleS|ource");|
|000018f0| 09 09 09 0a 09 09 09 77 | 69 6e 64 6f 77 2e 73 69 |.......w|indow.si|
|00001900| 7a 65 54 6f 43 6f 6e 74 | 65 6e 74 28 29 3b 0a 09 |zeToCont|ent();..|
|00001910| 09 09 77 69 6e 64 6f 77 | 2e 6d 6f 76 65 54 6f 28 |..window|.moveTo(|
|00001920| 28 77 69 6e 64 6f 77 2e | 73 63 72 65 65 6e 58 2d |(window.|screenX-|
|00001930| 37 35 29 2c 20 77 69 6e | 64 6f 77 2e 73 63 72 65 |75), win|dow.scre|
|00001940| 65 6e 59 29 3b 0a 09 09 | 09 74 72 65 65 49 74 65 |enY);...|.treeIte|
|00001950| 6d 53 65 6c 65 63 74 65 | 64 28 29 3b 0a 09 09 09 |mSelecte|d();....|
|00001960| 2f 2f 20 64 69 73 61 62 | 6c 65 20 61 64 64 69 6e |// disab|le addin|
|00001970| 67 20 69 6e 66 6f 20 75 | 6e 74 69 6c 20 63 69 74 |g info u|ntil cit|
|00001980| 61 74 69 6f 6e 20 61 64 | 64 65 64 0a 09 09 09 5f |ation ad|ded...._|
|00001990| 69 74 65 6d 53 65 6c 65 | 63 74 65 64 28 66 61 6c |itemSele|cted(fal|
|000019a0| 73 65 29 3b 0a 09 09 7d | 20 65 6c 73 65 20 7b 0a |se);...}| else {.|
|000019b0| 09 09 09 64 6f 63 75 6d | 65 6e 74 2e 67 65 74 45 |...docum|ent.getE|
|000019c0| 6c 65 6d 65 6e 74 42 79 | 49 64 28 22 6d 75 6c 74 |lementBy|Id("mult|
|000019d0| 69 70 6c 65 2d 73 6f 75 | 72 63 65 73 22 29 2e 68 |iple-sou|rces").h|
|000019e0| 69 64 64 65 6e 20 3d 20 | 74 72 75 65 3b 0a 09 09 |idden = |true;...|
|000019f0| 09 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 |.documen|t.getEle|
|00001a00| 6d 65 6e 74 42 79 49 64 | 28 22 61 64 64 2d 63 69 |mentById|("add-ci|
|00001a10| 74 61 74 69 6f 6e 2d 64 | 69 61 6c 6f 67 22 29 2e |tation-d|ialog").|
|00001a20| 77 69 64 74 68 20 3d 20 | 22 36 30 30 22 3b 0a 09 |width = |"600";..|
|00001a30| 09 09 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c |..docume|nt.getEl|
|00001a40| 65 6d 65 6e 74 42 79 49 | 64 28 22 6d 75 6c 74 69 |ementByI|d("multi|
|00001a50| 70 6c 65 2d 73 6f 75 72 | 63 65 73 2d 62 75 74 74 |ple-sour|ces-butt|
|00001a60| 6f 6e 22 29 2e 6c 61 62 | 65 6c 20 3d 20 5a 6f 74 |on").lab|el = Zot|
|00001a70| 65 72 6f 2e 67 65 74 53 | 74 72 69 6e 67 28 22 63 |ero.getS|tring("c|
|00001a80| 69 74 61 74 69 6f 6e 2e | 6d 75 6c 74 69 70 6c 65 |itation.|multiple|
|00001a90| 53 6f 75 72 63 65 73 22 | 29 3b 09 09 09 0a 09 09 |Sources"|);......|
|00001aa0| 09 77 69 6e 64 6f 77 2e | 73 69 7a 65 54 6f 43 6f |.window.|sizeToCo|
|00001ab0| 6e 74 65 6e 74 28 29 3b | 0a 09 09 09 77 69 6e 64 |ntent();|....wind|
|00001ac0| 6f 77 2e 6d 6f 76 65 54 | 6f 28 28 77 69 6e 64 6f |ow.moveT|o((windo|
|00001ad0| 77 2e 73 63 72 65 65 6e | 58 2b 37 35 29 2c 20 77 |w.screen|X+75), w|
|00001ae0| 69 6e 64 6f 77 2e 73 63 | 72 65 65 6e 59 29 3b 0a |indow.sc|reenY);.|
|00001af0| 09 09 09 0a 09 09 09 2f | 2f 20 65 6e 61 62 6c 65 |......./|/ enable|
|00001b00| 20 61 6c 6c 20 66 69 65 | 6c 64 73 0a 09 09 09 66 | all fie|lds....f|
|00001b10| 6f 72 28 76 61 72 20 69 | 20 69 6e 20 5f 70 72 65 |or(var i| in _pre|
|00001b20| 73 65 72 76 65 44 61 74 | 61 29 20 7b 0a 09 09 09 |serveDat|a) {....|
|00001b30| 09 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 |.documen|t.getEle|
|00001b40| 6d 65 6e 74 42 79 49 64 | 28 69 29 2e 64 69 73 61 |mentById|(i).disa|
|00001b50| 62 6c 65 64 20 3d 20 66 | 61 6c 73 65 3b 0a 09 09 |bled = f|alse;...|
|00001b60| 09 7d 0a 09 09 09 0a 09 | 09 09 2f 2f 20 64 65 6c |.}......|..// del|
|00001b70| 65 74 65 20 69 74 65 6d | 20 6c 69 73 74 0a 09 09 |ete item| list...|
|00001b80| 09 5f 69 74 65 6d 44 61 | 74 61 20 3d 20 6e 65 77 |._itemDa|ta = new|
|00001b90| 20 4f 62 6a 65 63 74 28 | 29 3b 0a 09 09 09 0a 09 | Object(|);......|
|00001ba0| 09 09 2f 2f 20 64 65 6c | 65 74 65 20 61 6c 6c 20 |..// del|ete all |
|00001bb0| 69 74 65 6d 73 0a 09 09 | 09 5f 63 6c 65 61 72 43 |items...|._clearC|
|00001bc0| 69 74 61 74 69 6f 6e 4c | 69 73 74 28 29 3b 0a 09 |itationL|ist();..|
|00001bd0| 09 7d 0a 09 09 5f 75 70 | 64 61 74 65 41 63 63 65 |.}..._up|dateAcce|
|00001be0| 70 74 28 29 3b 0a 09 09 | 5f 75 70 64 61 74 65 50 |pt();...|_updateP|
|00001bf0| 72 65 76 69 65 77 28 29 | 3b 0a 09 7d 0a 09 0a 09 |review()|;..}....|
|00001c00| 2f 2a 0a 09 20 2a 20 63 | 61 6c 6c 65 64 20 77 68 |/*.. * c|alled wh|
|00001c10| 65 6e 20 61 6e 20 69 74 | 65 6d 20 69 6e 20 74 68 |en an it|em in th|
|00001c20| 65 20 69 74 65 6d 20 73 | 65 6c 65 63 74 69 6f 6e |e item s|election|
|00001c30| 20 74 72 65 65 20 69 73 | 20 63 6c 69 63 6b 65 64 | tree is| clicked|
|00001c40| 0a 09 20 2a 2f 0a 09 66 | 75 6e 63 74 69 6f 6e 20 |.. */..f|unction |
|00001c50| 74 72 65 65 49 74 65 6d | 53 65 6c 65 63 74 65 64 |treeItem|Selected|
|00001c60| 28 29 20 7b 0a 09 09 69 | 66 28 5f 73 75 70 70 72 |() {...i|f(_suppr|
|00001c70| 65 73 73 4e 65 78 74 54 | 72 65 65 53 65 6c 65 63 |essNextT|reeSelec|
|00001c80| 74 29 20 7b 0a 09 09 09 | 5f 73 75 70 70 72 65 73 |t) {....|_suppres|
|00001c90| 73 4e 65 78 74 54 72 65 | 65 53 65 6c 65 63 74 20 |sNextTre|eSelect |
|00001ca0| 3d 20 66 61 6c 73 65 3b | 0a 09 09 09 5f 75 70 64 |= false;|...._upd|
|00001cb0| 61 74 65 41 63 63 65 70 | 74 28 29 3b 0a 09 09 09 |ateAccep|t();....|
|00001cc0| 72 65 74 75 72 6e 3b 0a | 09 09 7d 0a 09 09 76 61 |return;.|..}...va|
|00001cd0| 72 20 69 74 65 6d 73 20 | 3d 20 69 74 65 6d 73 56 |r items |= itemsV|
|00001ce0| 69 65 77 2e 67 65 74 53 | 65 6c 65 63 74 65 64 49 |iew.getS|electedI|
|00001cf0| 74 65 6d 73 28 74 72 75 | 65 29 3b 20 2f 2f 20 74 |tems(tru|e); // t|
|00001d00| 72 65 65 76 69 65 77 20 | 66 72 6f 6d 20 73 65 6c |reeview |from sel|
|00001d10| 65 63 74 49 74 65 6d 73 | 44 69 61 6c 6f 67 2e 6a |ectItems|Dialog.j|
|00001d20| 73 0a 09 09 76 61 72 20 | 69 74 65 6d 49 44 20 3d |s...var |itemID =|
|00001d30| 20 28 69 74 65 6d 73 2e | 6c 65 6e 67 74 68 20 3f | (items.|length ?|
|00001d40| 20 69 74 65 6d 73 5b 30 | 5d 20 3a 20 66 61 6c 73 | items[0|] : fals|
|00001d50| 65 29 3b 0a 09 09 0a 09 | 09 69 66 28 5f 6d 75 6c |e);.....|.if(_mul|
|00001d60| 74 69 70 6c 65 53 6f 75 | 72 63 65 73 4f 6e 29 20 |tipleSou|rcesOn) |
|00001d70| 7b 0a 09 09 09 2f 2f 20 | 69 66 20 69 74 65 6d 20 |{....// |if item |
|00001d80| 69 73 20 61 6c 73 6f 20 | 6f 6e 20 72 69 67 68 74 |is also |on right|
|00001d90| 20 73 69 64 65 2c 20 73 | 68 6f 77 20 69 6e 66 6f | side, s|how info|
|00001da0| 0a 09 09 09 76 61 72 20 | 68 61 73 42 65 65 6e 41 |....var |hasBeenA|
|00001db0| 64 64 65 64 20 3d 20 69 | 74 65 6d 49 44 20 26 26 |dded = i|temID &&|
|00001dc0| 20 5f 69 74 65 6d 44 61 | 74 61 5b 69 74 65 6d 49 | _itemDa|ta[itemI|
|00001dd0| 44 5d 20 21 3d 3d 20 75 | 6e 64 65 66 69 6e 65 64 |D] !== u|ndefined|
|00001de0| 3b 0a 09 09 09 2f 2f 20 | 64 69 73 61 62 6c 65 20 |;....// |disable |
|00001df0| 62 6f 78 65 73 20 69 66 | 20 69 74 65 6d 20 6e 6f |boxes if| item no|
|00001e00| 74 20 61 64 64 65 64 3b | 20 6f 74 68 65 72 77 69 |t added;| otherwi|
|00001e10| 73 65 2c 20 65 6e 61 62 | 6c 65 0a 09 09 09 5f 69 |se, enab|le...._i|
|00001e20| 74 65 6d 53 65 6c 65 63 | 74 65 64 28 68 61 73 42 |temSelec|ted(hasB|
|00001e30| 65 65 6e 41 64 64 65 64 | 20 3f 20 69 74 65 6d 49 |eenAdded| ? itemI|
|00001e40| 44 20 3a 20 66 61 6c 73 | 65 29 3b 0a 09 09 09 2f |D : fals|e);..../|
|00001e50| 2f 20 64 69 73 61 62 6c | 65 20 61 64 64 69 6e 67 |/ disabl|e adding|
|00001e60| 20 6e 6f 74 68 69 6e 67 | 2c 20 6f 72 20 74 68 69 | nothing|, or thi|
|00001e70| 6e 67 73 20 61 6c 72 65 | 61 64 79 20 61 64 64 65 |ngs alre|ady adde|
|00001e80| 64 0a 09 09 09 64 6f 63 | 75 6d 65 6e 74 2e 67 65 |d....doc|ument.ge|
|00001e90| 74 45 6c 65 6d 65 6e 74 | 42 79 49 64 28 22 61 64 |tElement|ById("ad|
|00001ea0| 64 22 29 2e 64 69 73 61 | 62 6c 65 64 20 3d 20 21 |d").disa|bled = !|
|00001eb0| 69 74 65 6d 49 44 20 7c | 7c 20 68 61 73 42 65 65 |itemID ||| hasBee|
|00001ec0| 6e 41 64 64 65 64 3b 0a | 09 09 7d 20 65 6c 73 65 |nAdded;.|..} else|
|00001ed0| 20 7b 0a 09 09 09 5f 75 | 70 64 61 74 65 41 63 63 | {...._u|pdateAcc|
|00001ee0| 65 70 74 28 29 3b 0a 09 | 09 09 5f 75 70 64 61 74 |ept();..|.._updat|
|00001ef0| 65 50 72 65 76 69 65 77 | 28 29 3b 0a 09 09 7d 0a |ePreview|();...}.|
|00001f00| 09 7d 0a 09 0a 09 2f 2a | 0a 09 20 2a 20 63 61 6c |.}..../*|.. * cal|
|00001f10| 6c 65 64 20 77 68 65 6e | 20 61 6e 20 69 74 65 6d |led when| an item|
|00001f20| 20 69 6e 20 74 68 65 20 | 73 65 6c 65 63 74 65 64 | in the |selected|
|00001f30| 20 69 74 65 6d 73 20 6c | 69 73 74 20 69 73 20 63 | items l|ist is c|
|00001f40| 6c 69 63 6b 65 64 0a 09 | 20 2a 2f 0a 09 66 75 6e |licked..| */..fun|
|00001f50| 63 74 69 6f 6e 20 6c 69 | 73 74 49 74 65 6d 53 65 |ction li|stItemSe|
|00001f60| 6c 65 63 74 65 64 28 29 | 20 7b 0a 09 09 76 61 72 |lected()| {...var|
|00001f70| 20 73 65 6c 65 63 74 65 | 64 4c 69 73 74 49 74 65 | selecte|dListIte|
|00001f80| 6d 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 67 65 74 |m = docu|ment.get|
|00001f90| 45 6c 65 6d 65 6e 74 42 | 79 49 64 28 22 63 69 74 |ElementB|yId("cit|
|00001fa0| 61 74 69 6f 6e 2d 6c 69 | 73 74 22 29 2e 67 65 74 |ation-li|st").get|
|00001fb0| 53 65 6c 65 63 74 65 64 | 49 74 65 6d 28 30 29 3b |Selected|Item(0);|
|00001fc0| 0a 09 09 76 61 72 20 69 | 74 65 6d 49 44 20 3d 20 |...var i|temID = |
|00001fd0| 28 73 65 6c 65 63 74 65 | 64 4c 69 73 74 49 74 65 |(selecte|dListIte|
|00001fe0| 6d 20 3f 20 73 65 6c 65 | 63 74 65 64 4c 69 73 74 |m ? sele|ctedList|
|00001ff0| 49 74 65 6d 2e 76 61 6c | 75 65 20 3a 20 66 61 6c |Item.val|ue : fal|
|00002000| 73 65 29 3b 0a 09 09 5f | 69 74 65 6d 53 65 6c 65 |se);..._|itemSele|
|00002010| 63 74 65 64 28 69 74 65 | 6d 49 44 29 3b 0a 09 09 |cted(ite|mID);...|
|00002020| 0a 09 09 64 6f 63 75 6d | 65 6e 74 2e 67 65 74 45 |...docum|ent.getE|
|00002030| 6c 65 6d 65 6e 74 42 79 | 49 64 28 22 72 65 6d 6f |lementBy|Id("remo|
|00002040| 76 65 22 29 2e 64 69 73 | 61 62 6c 65 64 20 3d 20 |ve").dis|abled = |
|00002050| 21 69 74 65 6d 49 44 3b | 0a 09 7d 0a 09 0a 09 2f |!itemID;|..}..../|
|00002060| 2a 0a 09 20 2a 20 41 64 | 64 73 20 61 20 63 69 74 |*.. * Ad|ds a cit|
|00002070| 61 74 69 6f 6e 20 74 6f | 20 74 68 65 20 6d 75 6c |ation to| the mul|
|00002080| 74 69 70 6c 65 53 6f 75 | 72 63 65 73 20 6c 69 73 |tipleSou|rces lis|
|00002090| 74 0a 09 20 2a 2f 0a 09 | 66 75 6e 63 74 69 6f 6e |t.. */..|function|
|000020a0| 20 61 64 64 28 29 20 7b | 0a 09 09 76 61 72 20 69 | add() {|...var i|
|000020b0| 74 65 6d 20 3d 20 69 74 | 65 6d 73 56 69 65 77 2e |tem = it|emsView.|
|000020c0| 67 65 74 53 65 6c 65 63 | 74 65 64 49 74 65 6d 73 |getSelec|tedItems|
|000020d0| 28 29 5b 30 5d 3b 20 2f | 2f 20 74 72 65 65 76 69 |()[0]; /|/ treevi|
|000020e0| 65 77 20 66 72 6f 6d 20 | 73 65 6c 65 63 74 49 74 |ew from |selectIt|
|000020f0| 65 6d 73 44 69 61 6c 6f | 67 2e 6a 73 0a 09 09 5f |emsDialo|g.js..._|
|00002100| 69 74 65 6d 53 65 6c 65 | 63 74 65 64 28 69 74 65 |itemSele|cted(ite|
|00002110| 6d 2e 67 65 74 49 44 28 | 29 29 3b 0a 09 09 5f 61 |m.getID(|));..._a|
|00002120| 64 64 49 74 65 6d 28 69 | 74 65 6d 29 3b 0a 09 09 |ddItem(i|tem);...|
|00002130| 0a 09 09 2f 2f 20 64 6f | 6e 27 74 20 6c 65 74 20 |...// do|n't let |
|00002140| 73 6f 6d 65 6f 6e 65 20 | 73 65 6c 65 63 74 20 69 |someone |select i|
|00002150| 74 20 61 67 61 69 6e 0a | 09 09 64 6f 63 75 6d 65 |t again.|..docume|
|00002160| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|00002170| 64 28 22 61 64 64 22 29 | 2e 64 69 73 61 62 6c 65 |d("add")|.disable|
|00002180| 64 20 3d 20 74 72 75 65 | 3b 0a 09 09 0a 09 09 2f |d = true|;....../|
|00002190| 2f 20 61 6c 6c 6f 77 20 | 75 73 65 72 20 74 6f 20 |/ allow |user to |
|000021a0| 70 72 65 73 73 20 4f 4b | 0a 09 09 5f 75 70 64 61 |press OK|..._upda|
|000021b0| 74 65 41 63 63 65 70 74 | 28 29 3b 0a 09 09 5f 75 |teAccept|();..._u|
|000021c0| 70 64 61 74 65 50 72 65 | 76 69 65 77 28 29 3b 0a |pdatePre|view();.|
|000021d0| 09 09 73 6f 72 74 43 69 | 74 61 74 69 6f 6e 28 29 |..sortCi|tation()|
|000021e0| 3b 0a 09 7d 0a 09 0a 09 | 2f 2a 0a 09 20 2a 20 44 |;..}....|/*.. * D|
|000021f0| 65 6c 65 74 65 73 20 61 | 20 63 69 74 61 74 69 6f |eletes a| citatio|
|00002200| 6e 20 66 72 6f 6d 20 74 | 68 65 20 6d 75 6c 74 69 |n from t|he multi|
|00002210| 70 6c 65 53 6f 75 72 63 | 65 73 20 6c 69 73 74 0a |pleSourc|es list.|
|00002220| 09 20 2a 2f 0a 09 66 75 | 6e 63 74 69 6f 6e 20 72 |. */..fu|nction r|
|00002230| 65 6d 6f 76 65 28 29 20 | 7b 0a 09 09 76 61 72 20 |emove() |{...var |
|00002240| 63 69 74 61 74 69 6f 6e | 4c 69 73 74 20 3d 20 64 |citation|List = d|
|00002250| 6f 63 75 6d 65 6e 74 2e | 67 65 74 45 6c 65 6d 65 |ocument.|getEleme|
|00002260| 6e 74 42 79 49 64 28 22 | 63 69 74 61 74 69 6f 6e |ntById("|citation|
|00002270| 2d 6c 69 73 74 22 29 3b | 0a 09 09 76 61 72 20 73 |-list");|...var s|
|00002280| 65 6c 65 63 74 65 64 4c | 69 73 74 49 74 65 6d 20 |electedL|istItem |
|00002290| 3d 20 63 69 74 61 74 69 | 6f 6e 4c 69 73 74 2e 67 |= citati|onList.g|
|000022a0| 65 74 53 65 6c 65 63 74 | 65 64 49 74 65 6d 28 30 |etSelect|edItem(0|
|000022b0| 29 3b 0a 09 09 76 61 72 | 20 69 74 65 6d 49 44 20 |);...var| itemID |
|000022c0| 3d 20 73 65 6c 65 63 74 | 65 64 4c 69 73 74 49 74 |= select|edListIt|
|000022d0| 65 6d 2e 76 61 6c 75 65 | 3b 0a 09 09 0a 09 09 2f |em.value|;....../|
|000022e0| 2f 20 72 65 6d 6f 76 65 | 20 66 72 6f 6d 20 5f 69 |/ remove| from _i|
|000022f0| 74 65 6d 44 61 74 61 0a | 09 09 64 65 6c 65 74 65 |temData.|..delete|
|00002300| 20 5f 69 74 65 6d 44 61 | 74 61 5b 69 74 65 6d 49 | _itemDa|ta[itemI|
|00002310| 44 5d 3b 0a 09 09 5f 69 | 74 65 6d 44 61 74 61 5b |D];..._i|temData[|
|00002320| 69 74 65 6d 49 44 5d 20 | 3d 20 75 6e 64 65 66 69 |itemID] |= undefi|
|00002330| 6e 65 64 3b 0a 09 09 5f | 6c 61 73 74 53 65 6c 65 |ned;..._|lastSele|
|00002340| 63 74 65 64 20 3d 20 6e | 75 6c 6c 3b 0a 09 09 0a |cted = n|ull;....|
|00002350| 09 09 2f 2f 20 72 65 2d | 73 65 6c 65 63 74 20 63 |..// re-|select c|
|00002360| 75 72 72 65 6e 74 6c 79 | 20 73 65 6c 65 63 74 65 |urrently| selecte|
|00002370| 64 20 69 6e 20 6c 65 66 | 74 20 70 61 6e 65 0a 09 |d in lef|t pane..|
|00002380| 09 76 61 72 20 69 74 65 | 6d 49 44 73 20 3d 20 69 |.var ite|mIDs = i|
|00002390| 74 65 6d 73 56 69 65 77 | 2e 67 65 74 53 65 6c 65 |temsView|.getSele|
|000023a0| 63 74 65 64 49 74 65 6d | 73 28 74 72 75 65 29 3b |ctedItem|s(true);|
|000023b0| 20 2f 2f 20 74 72 65 65 | 76 69 65 77 20 66 72 6f | // tree|view fro|
|000023c0| 6d 20 73 65 6c 65 63 74 | 49 74 65 6d 73 44 69 61 |m select|ItemsDia|
|000023d0| 6c 6f 67 2e 6a 73 0a 09 | 09 69 66 28 69 74 65 6d |log.js..|.if(item|
|000023e0| 49 44 73 2e 6c 65 6e 67 | 74 68 29 20 7b 0a 09 09 |IDs.leng|th) {...|
|000023f0| 09 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 |.documen|t.getEle|
|00002400| 6d 65 6e 74 42 79 49 64 | 28 22 7a 6f 74 65 72 6f |mentById|("zotero|
|00002410| 2d 69 74 65 6d 73 2d 74 | 72 65 65 22 29 2e 66 6f |-items-t|ree").fo|
|00002420| 63 75 73 28 29 3b 0a 09 | 09 09 74 72 65 65 49 74 |cus();..|..treeIt|
|00002430| 65 6d 53 65 6c 65 63 74 | 65 64 28 29 3b 0a 09 09 |emSelect|ed();...|
|00002440| 7d 0a 09 09 0a 09 09 2f | 2f 20 72 65 6d 6f 76 65 |}....../|/ remove|
|00002450| 20 66 72 6f 6d 20 6c 69 | 73 74 0a 09 09 63 69 74 | from li|st...cit|
|00002460| 61 74 69 6f 6e 4c 69 73 | 74 2e 72 65 6d 6f 76 65 |ationLis|t.remove|
|00002470| 43 68 69 6c 64 28 73 65 | 6c 65 63 74 65 64 4c 69 |Child(se|lectedLi|
|00002480| 73 74 49 74 65 6d 29 3b | 0a 09 09 0a 09 09 5f 75 |stItem);|......_u|
|00002490| 70 64 61 74 65 41 63 63 | 65 70 74 28 29 3b 0a 09 |pdateAcc|ept();..|
|000024a0| 09 5f 75 70 64 61 74 65 | 50 72 65 76 69 65 77 28 |._update|Preview(|
|000024b0| 29 3b 0a 09 09 74 72 65 | 65 49 74 65 6d 53 65 6c |);...tre|eItemSel|
|000024c0| 65 63 74 65 64 28 29 3b | 0a 09 7d 0a 09 0a 09 2f |ected();|..}..../|
|000024d0| 2a 0a 09 20 2a 20 53 6f | 72 74 73 20 74 68 65 20 |*.. * So|rts the |
|000024e0| 6c 69 73 74 20 6f 66 20 | 63 69 74 61 74 69 6f 6e |list of |citation|
|000024f0| 73 0a 09 20 2a 2f 0a 09 | 66 75 6e 63 74 69 6f 6e |s.. */..|function|
|00002500| 20 73 6f 72 74 43 69 74 | 61 74 69 6f 6e 28 29 20 | sortCit|ation() |
|00002510| 7b 0a 09 09 69 6f 2e 63 | 69 74 61 74 69 6f 6e 2e |{...io.c|itation.|
|00002520| 70 72 6f 70 65 72 74 69 | 65 73 2e 73 6f 72 74 20 |properti|es.sort |
|00002530| 3d 20 5f 73 6f 72 74 43 | 68 65 63 6b 62 6f 78 2e |= _sortC|heckbox.|
|00002540| 63 68 65 63 6b 65 64 3b | 0a 09 09 69 66 28 5f 73 |checked;|...if(_s|
|00002550| 6f 72 74 43 68 65 63 6b | 62 6f 78 2e 63 68 65 63 |ortCheck|box.chec|
|00002560| 6b 65 64 29 20 7b 0a 09 | 09 09 5f 67 65 74 43 69 |ked) {..|.._getCi|
|00002570| 74 61 74 69 6f 6e 28 29 | 3b 0a 09 09 09 0a 09 09 |tation()|;.......|
|00002580| 09 2f 2f 20 64 65 6c 65 | 74 65 20 61 6c 6c 20 65 |.// dele|te all e|
|00002590| 78 69 73 74 69 6e 67 20 | 69 74 65 6d 73 20 66 72 |xisting |items fr|
|000025a0| 6f 6d 20 6c 69 73 74 0a | 09 09 09 5f 63 6c 65 61 |om list.|..._clea|
|000025b0| 72 43 69 74 61 74 69 6f | 6e 4c 69 73 74 28 29 3b |rCitatio|nList();|
|000025c0| 0a 09 09 09 0a 09 09 09 | 2f 2f 20 72 75 6e 20 70 |........|// run p|
|000025d0| 72 65 76 69 65 77 20 66 | 75 6e 63 74 69 6f 6e 20 |review f|unction |
|000025e0| 74 6f 20 72 65 2d 73 6f | 72 74 2c 20 69 66 20 69 |to re-so|rt, if i|
|000025f0| 74 20 68 61 73 6e 27 74 | 20 61 6c 72 65 61 64 79 |t hasn't| already|
|00002600| 20 62 65 65 6e 0a 09 09 | 09 2f 2f 20 72 75 6e 0a | been...|.// run.|
|00002610| 09 09 09 69 6f 2e 70 72 | 65 76 69 65 77 46 75 6e |...io.pr|eviewFun|
|00002620| 63 74 69 6f 6e 28 29 3b | 0a 09 09 09 0a 09 09 09 |ction();|........|
|00002630| 2f 2f 20 61 64 64 20 69 | 74 65 6d 73 20 62 61 63 |// add i|tems bac|
|00002640| 6b 20 74 6f 20 6c 69 73 | 74 0a 09 09 09 66 6f 72 |k to lis|t....for|
|00002650| 28 76 61 72 20 69 3d 30 | 3b 20 69 3c 69 6f 2e 63 |(var i=0|; i<io.c|
|00002660| 69 74 61 74 69 6f 6e 2e | 63 69 74 61 74 69 6f 6e |itation.|citation|
|00002670| 49 74 65 6d 73 2e 6c 65 | 6e 67 74 68 3b 20 69 2b |Items.le|ngth; i+|
|00002680| 2b 29 20 7b 0a 09 09 09 | 09 76 61 72 20 69 74 65 |+) {....|.var ite|
|00002690| 6d 20 3d 20 5a 6f 74 65 | 72 6f 2e 49 74 65 6d 73 |m = Zote|ro.Items|
|000026a0| 2e 67 65 74 28 69 6f 2e | 63 69 74 61 74 69 6f 6e |.get(io.|citation|
|000026b0| 2e 63 69 74 61 74 69 6f | 6e 49 74 65 6d 73 5b 69 |.citatio|nItems[i|
|000026c0| 5d 2e 69 74 65 6d 49 44 | 29 3b 0a 09 09 09 09 5f |].itemID|);....._|
|000026d0| 61 64 64 49 74 65 6d 28 | 69 74 65 6d 29 3b 0a 09 |addItem(|item);..|
|000026e0| 09 09 7d 0a 09 09 7d 0a | 09 7d 0a 09 0a 09 2f 2a |..}...}.|.}..../*|
|000026f0| 0a 09 20 2a 20 41 73 6b | 20 77 68 65 74 68 65 72 |.. * Ask| whether|
|00002700| 20 74 6f 20 6d 6f 64 66 | 69 79 20 74 68 65 20 70 | to modf|iy the p|
|00002710| 72 65 76 69 65 77 0a 09 | 20 2a 2f 0a 09 66 75 6e |review..| */..fun|
|00002720| 63 74 69 6f 6e 20 63 6f | 6e 66 69 72 6d 52 65 67 |ction co|nfirmReg|
|00002730| 65 6e 65 72 61 74 65 28 | 66 6f 63 75 73 53 68 69 |enerate(|focusShi|
|00002740| 66 74 65 64 29 20 7b 0a | 09 09 69 66 28 64 6f 63 |fted) {.|..if(doc|
|00002750| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|00002760| 42 79 49 64 28 27 65 64 | 69 74 6f 72 27 29 2e 76 |ById('ed|itor').v|
|00002770| 61 6c 75 65 20 3d 3d 20 | 5f 6f 72 69 67 69 6e 61 |alue == |_origina|
|00002780| 6c 48 54 4d 4c 29 20 7b | 0a 09 09 09 2f 2f 20 6e |lHTML) {|....// n|
|00002790| 6f 20 63 68 61 6e 67 65 | 73 3b 20 6a 75 73 74 20 |o change|s; just |
|000027a0| 75 70 64 61 74 65 20 77 | 69 74 68 6f 75 74 20 61 |update w|ithout a|
|000027b0| 73 6b 69 6e 67 0a 09 09 | 09 5f 75 70 64 61 74 65 |sking...|._update|
|000027c0| 50 72 65 76 69 65 77 28 | 29 3b 0a 09 09 09 72 65 |Preview(|);....re|
|000027d0| 74 75 72 6e 3b 0a 09 09 | 7d 0a 09 09 0a 09 09 69 |turn;...|}......i|
|000027e0| 66 28 5f 61 75 74 6f 52 | 65 67 65 6e 65 72 61 74 |f(_autoR|egenerat|
|000027f0| 65 50 72 65 66 20 3d 3d | 20 2d 31 29 20 7b 0a 09 |ePref ==| -1) {..|
|00002800| 09 09 69 66 28 66 6f 63 | 75 73 53 68 69 66 74 65 |..if(foc|usShifte|
|00002810| 64 29 20 7b 09 2f 2f 20 | 6f 6e 6c 79 20 61 73 6b |d) {.// |only ask|
|00002820| 20 61 66 74 65 72 20 6f | 6e 63 68 61 6e 67 65 20 | after o|nchange |
|00002830| 65 76 65 6e 74 3b 20 6f | 6e 69 6e 70 75 74 20 69 |event; o|ninput i|
|00002840| 73 20 74 6f 6f 0a 09 09 | 09 09 09 09 09 09 2f 2f |s too...|......//|
|00002850| 20 66 72 65 71 75 65 6e | 74 20 66 6f 72 20 74 68 | frequen|t for th|
|00002860| 69 73 20 74 6f 20 62 65 | 20 77 6f 72 74 68 77 68 |is to be| worthwh|
|00002870| 69 6c 65 0a 09 09 09 09 | 76 61 72 20 70 72 6f 6d |ile.....|var prom|
|00002880| 70 74 53 65 72 76 69 63 | 65 20 3d 20 43 6f 6d 70 |ptServic|e = Comp|
|00002890| 6f 6e 65 6e 74 73 2e 63 | 6c 61 73 73 65 73 5b 22 |onents.c|lasses["|
|000028a0| 40 6d 6f 7a 69 6c 6c 61 | 2e 6f 72 67 2f 65 6d 62 |@mozilla|.org/emb|
|000028b0| 65 64 63 6f 6d 70 2f 70 | 72 6f 6d 70 74 2d 73 65 |edcomp/p|rompt-se|
|000028c0| 72 76 69 63 65 3b 31 22 | 5d 0a 09 09 09 09 09 09 |rvice;1"|].......|
|000028d0| 09 09 09 09 09 09 2e 67 | 65 74 53 65 72 76 69 63 |.......g|etServic|
|000028e0| 65 28 43 6f 6d 70 6f 6e | 65 6e 74 73 2e 69 6e 74 |e(Compon|ents.int|
|000028f0| 65 72 66 61 63 65 73 2e | 6e 73 49 50 72 6f 6d 70 |erfaces.|nsIPromp|
|00002900| 74 53 65 72 76 69 63 65 | 29 3b 0a 09 09 09 09 0a |tService|);......|
|00002910| 09 09 09 09 76 61 72 20 | 73 61 76 65 42 65 68 61 |....var |saveBeha|
|00002920| 76 69 6f 72 20 3d 20 7b | 20 76 61 6c 75 65 3a 20 |vior = {| value: |
|00002930| 66 61 6c 73 65 20 7d 3b | 0a 09 09 09 09 76 61 72 |false };|.....var|
|00002940| 20 72 65 67 65 6e 65 72 | 61 74 65 20 3d 20 70 72 | regener|ate = pr|
|00002950| 6f 6d 70 74 53 65 72 76 | 69 63 65 2e 63 6f 6e 66 |omptServ|ice.conf|
|00002960| 69 72 6d 45 78 28 0a 09 | 09 09 09 09 74 68 69 73 |irmEx(..|....this|
|00002970| 2e 77 69 6e 64 6f 77 2c | 0a 09 09 09 09 09 5a 6f |.window,|......Zo|
|00002980| 74 65 72 6f 2e 67 65 74 | 53 74 72 69 6e 67 28 27 |tero.get|String('|
|00002990| 69 6e 74 65 67 72 61 74 | 69 6f 6e 2e 72 65 67 65 |integrat|ion.rege|
|000029a0| 6e 65 72 61 74 65 2e 74 | 69 74 6c 65 27 29 2c 0a |nerate.t|itle'),.|
|000029b0| 09 09 09 09 09 5a 6f 74 | 65 72 6f 2e 67 65 74 53 |.....Zot|ero.getS|
|000029c0| 74 72 69 6e 67 28 27 69 | 6e 74 65 67 72 61 74 69 |tring('i|ntegrati|
|000029d0| 6f 6e 2e 72 65 67 65 6e | 65 72 61 74 65 2e 62 6f |on.regen|erate.bo|
|000029e0| 64 79 27 29 2c 0a 09 09 | 09 09 09 70 72 6f 6d 70 |dy'),...|...promp|
|000029f0| 74 53 65 72 76 69 63 65 | 2e 53 54 44 5f 59 45 53 |tService|.STD_YES|
|00002a00| 5f 4e 4f 5f 42 55 54 54 | 4f 4e 53 2c 0a 09 09 09 |_NO_BUTT|ONS,....|
|00002a10| 09 09 6e 75 6c 6c 2c 20 | 6e 75 6c 6c 2c 20 6e 75 |..null, |null, nu|
|00002a20| 6c 6c 2c 0a 09 09 09 09 | 09 5a 6f 74 65 72 6f 2e |ll,.....|.Zotero.|
|00002a30| 67 65 74 53 74 72 69 6e | 67 28 27 69 6e 74 65 67 |getStrin|g('integ|
|00002a40| 72 61 74 69 6f 6e 2e 72 | 65 67 65 6e 65 72 61 74 |ration.r|egenerat|
|00002a50| 65 2e 73 61 76 65 42 65 | 68 61 76 69 6f 72 27 29 |e.saveBe|havior')|
|00002a60| 2c 0a 09 09 09 09 09 73 | 61 76 65 42 65 68 61 76 |,......s|aveBehav|
|00002a70| 69 6f 72 0a 09 09 09 09 | 29 3b 0a 09 09 09 09 0a |ior.....|);......|
|00002a80| 09 09 09 09 69 66 28 73 | 61 76 65 42 65 68 61 76 |....if(s|aveBehav|
|00002a90| 69 6f 72 2e 76 61 6c 75 | 65 29 20 7b 0a 09 09 09 |ior.valu|e) {....|
|00002aa0| 09 09 5f 61 75 74 6f 52 | 65 67 65 6e 65 72 61 74 |.._autoR|egenerat|
|00002ab0| 65 50 72 65 66 20 3d 20 | 28 72 65 67 65 6e 65 72 |ePref = |(regener|
|00002ac0| 61 74 65 20 3d 3d 20 30 | 20 3f 20 31 20 3a 20 30 |ate == 0| ? 1 : 0|
|00002ad0| 29 3b 0a 09 09 09 09 09 | 5a 6f 74 65 72 6f 2e 50 |);......|Zotero.P|
|00002ae0| 72 65 66 73 2e 73 65 74 | 28 22 69 6e 74 65 67 72 |refs.set|("integr|
|00002af0| 61 74 69 6f 6e 2e 61 75 | 74 6f 52 65 67 65 6e 65 |ation.au|toRegene|
|00002b00| 72 61 74 65 22 2c 20 5f | 61 75 74 6f 52 65 67 65 |rate", _|autoRege|
|00002b10| 6e 65 72 61 74 65 50 72 | 65 66 29 3b 0a 09 09 09 |neratePr|ef);....|
|00002b20| 09 7d 0a 09 09 09 09 0a | 09 09 09 09 69 66 28 72 |.}......|....if(r|
|00002b30| 65 67 65 6e 65 72 61 74 | 65 20 3d 3d 20 30 29 20 |egenerat|e == 0) |
|00002b40| 7b 0a 09 09 09 09 09 5f | 75 70 64 61 74 65 50 72 |{......_|updatePr|
|00002b50| 65 76 69 65 77 28 29 3b | 0a 09 09 09 09 7d 0a 09 |eview();|.....}..|
|00002b60| 09 09 7d 0a 09 09 7d 20 | 65 6c 73 65 20 69 66 28 |..}...} |else if(|
|00002b70| 5f 61 75 74 6f 52 65 67 | 65 6e 65 72 61 74 65 50 |_autoReg|enerateP|
|00002b80| 72 65 66 20 3d 3d 20 31 | 29 20 7b 0a 09 09 09 5f |ref == 1|) {...._|
|00002b90| 75 70 64 61 74 65 50 72 | 65 76 69 65 77 28 29 3b |updatePr|eview();|
|00002ba0| 0a 09 09 7d 0a 09 7d 0a | 09 0a 09 2f 2a 0a 09 20 |...}..}.|.../*.. |
|00002bb0| 2a 20 53 68 6f 77 73 20 | 74 68 65 20 65 64 69 74 |* Shows |the edit|
|00002bc0| 20 70 61 6e 65 0a 09 20 | 2a 2f 0a 09 66 75 6e 63 | pane.. |*/..func|
|00002bd0| 74 69 6f 6e 20 74 6f 67 | 67 6c 65 45 64 69 74 6f |tion tog|gleEdito|
|00002be0| 72 28 74 65 78 74 29 20 | 7b 0a 09 09 76 61 72 20 |r(text) |{...var |
|00002bf0| 65 64 69 74 6f 72 20 3d | 20 64 6f 63 75 6d 65 6e |editor =| documen|
|00002c00| 74 2e 67 65 74 45 6c 65 | 6d 65 6e 74 42 79 49 64 |t.getEle|mentById|
|00002c10| 28 27 65 64 69 74 6f 72 | 27 29 3b 0a 09 09 65 64 |('editor|');...ed|
|00002c20| 69 74 6f 72 2e 68 69 64 | 64 65 6e 20 3d 20 5f 70 |itor.hid|den = _p|
|00002c30| 72 65 76 69 65 77 53 68 | 6f 77 6e 3b 0a 09 09 5f |reviewSh|own;..._|
|00002c40| 70 72 65 76 69 65 77 53 | 68 6f 77 6e 20 3d 20 21 |previewS|hown = !|
|00002c50| 5f 70 72 65 76 69 65 77 | 53 68 6f 77 6e 3b 0a 09 |_preview|Shown;..|
|00002c60| 09 0a 09 09 69 66 28 5f | 70 72 65 76 69 65 77 53 |....if(_|previewS|
|00002c70| 68 6f 77 6e 29 20 7b 0a | 09 09 09 64 6f 63 75 6d |hown) {.|...docum|
|00002c80| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00002c90| 49 64 28 22 73 68 6f 77 | 2d 65 64 69 74 6f 72 2d |Id("show|-editor-|
|00002ca0| 62 75 74 74 6f 6e 22 29 | 2e 6c 61 62 65 6c 20 3d |button")|.label =|
|00002cb0| 20 5a 6f 74 65 72 6f 2e | 67 65 74 53 74 72 69 6e | Zotero.|getStrin|
|00002cc0| 67 28 22 63 69 74 61 74 | 69 6f 6e 2e 68 69 64 65 |g("citat|ion.hide|
|00002cd0| 45 64 69 74 6f 72 22 29 | 3b 09 09 0a 09 09 09 77 |Editor")|;......w|
|00002ce0| 69 6e 64 6f 77 2e 73 69 | 7a 65 54 6f 43 6f 6e 74 |indow.si|zeToCont|
|00002cf0| 65 6e 74 28 29 3b 0a 09 | 09 09 69 66 28 74 65 78 |ent();..|..if(tex|
|00002d00| 74 29 20 7b 0a 09 09 09 | 09 65 64 69 74 6f 72 2e |t) {....|.editor.|
|00002d10| 76 61 6c 75 65 20 3d 20 | 74 65 78 74 3b 0a 09 09 |value = |text;...|
|00002d20| 09 7d 20 65 6c 73 65 20 | 7b 0a 09 09 09 09 5f 75 |.} else |{....._u|
|00002d30| 70 64 61 74 65 50 72 65 | 76 69 65 77 28 29 3b 0a |pdatePre|view();.|
|00002d40| 09 09 09 7d 0a 09 09 7d | 20 65 6c 73 65 20 7b 0a |...}...}| else {.|
|00002d50| 09 09 09 64 6f 63 75 6d | 65 6e 74 2e 67 65 74 45 |...docum|ent.getE|
|00002d60| 6c 65 6d 65 6e 74 42 79 | 49 64 28 22 73 68 6f 77 |lementBy|Id("show|
|00002d70| 2d 65 64 69 74 6f 72 2d | 62 75 74 74 6f 6e 22 29 |-editor-|button")|
|00002d80| 2e 6c 61 62 65 6c 20 3d | 20 5a 6f 74 65 72 6f 2e |.label =| Zotero.|
|00002d90| 67 65 74 53 74 72 69 6e | 67 28 22 63 69 74 61 74 |getStrin|g("citat|
|00002da0| 69 6f 6e 2e 73 68 6f 77 | 45 64 69 74 6f 72 22 29 |ion.show|Editor")|
|00002db0| 3b 09 09 0a 09 09 09 77 | 69 6e 64 6f 77 2e 73 69 |;......w|indow.si|
|00002dc0| 7a 65 54 6f 43 6f 6e 74 | 65 6e 74 28 29 3b 0a 09 |zeToCont|ent();..|
|00002dd0| 09 7d 0a 09 7d 0a 09 0a | 09 2f 2a 0a 09 20 2a 20 |.}..}...|./*.. * |
|00002de0| 63 61 6c 6c 65 64 20 77 | 68 65 6e 20 61 63 63 65 |called w|hen acce|
|00002df0| 70 74 20 62 75 74 74 6f | 6e 20 69 73 20 63 6c 69 |pt butto|n is cli|
|00002e00| 63 6b 65 64 0a 09 20 2a | 2f 0a 09 66 75 6e 63 74 |cked.. *|/..funct|
|00002e10| 69 6f 6e 20 61 63 63 65 | 70 74 28 29 20 7b 0a 09 |ion acce|pt() {..|
|00002e20| 09 5f 67 65 74 43 69 74 | 61 74 69 6f 6e 28 29 3b |._getCit|ation();|
|00002e30| 0a 09 09 69 66 28 5f 70 | 72 65 76 69 65 77 53 68 |...if(_p|reviewSh|
|00002e40| 6f 77 6e 20 26 26 20 69 | 6f 2e 63 69 74 61 74 69 |own && i|o.citati|
|00002e50| 6f 6e 2e 63 69 74 61 74 | 69 6f 6e 49 74 65 6d 73 |on.citat|ionItems|
|00002e60| 2e 6c 65 6e 67 74 68 09 | 2f 2f 20 69 66 20 61 20 |.length.|// if a |
|00002e70| 63 69 74 61 74 69 6f 6e | 20 69 73 20 73 65 6c 65 |citation| is sele|
|00002e80| 63 74 65 64 0a 09 09 09 | 09 26 26 20 64 6f 63 75 |cted....|.&& docu|
|00002e90| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00002ea0| 79 49 64 28 27 65 64 69 | 74 6f 72 27 29 2e 76 61 |yId('edi|tor').va|
|00002eb0| 6c 75 65 20 21 3d 20 5f | 6f 72 69 67 69 6e 61 6c |lue != _|original|
|00002ec0| 48 54 4d 4c 29 20 7b 09 | 2f 2f 20 61 6e 64 20 63 |HTML) {.|// and c|
|00002ed0| 69 74 61 74 69 6f 6e 20 | 68 61 73 20 62 65 65 6e |itation |has been|
|00002ee0| 20 65 64 69 74 65 64 0a | 09 09 09 69 6f 2e 63 69 | edited.|...io.ci|
|00002ef0| 74 61 74 69 6f 6e 2e 70 | 72 6f 70 65 72 74 69 65 |tation.p|ropertie|
|00002f00| 73 2e 63 75 73 74 6f 6d | 20 3d 20 64 6f 63 75 6d |s.custom| = docum|
|00002f10| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00002f20| 49 64 28 27 65 64 69 74 | 6f 72 27 29 2e 76 61 6c |Id('edit|or').val|
|00002f30| 75 65 3b 0a 09 09 7d 0a | 09 7d 0a 09 0a 09 2f 2a |ue;...}.|.}..../*|
|00002f40| 0a 09 20 2a 20 63 61 6c | 6c 65 64 20 77 68 65 6e |.. * cal|led when|
|00002f50| 20 63 61 6e 63 65 6c 20 | 62 75 74 74 6f 6e 20 69 | cancel |button i|
|00002f60| 73 20 63 6c 69 63 6b 65 | 64 0a 09 20 2a 2f 0a 09 |s clicke|d.. */..|
|00002f70| 66 75 6e 63 74 69 6f 6e | 20 63 61 6e 63 65 6c 28 |function| cancel(|
|00002f80| 29 20 7b 0a 09 09 69 6f | 2e 63 69 74 61 74 69 6f |) {...io|.citatio|
|00002f90| 6e 2e 63 69 74 61 74 69 | 6f 6e 49 74 65 6d 73 20 |n.citati|onItems |
|00002fa0| 3d 20 6e 65 77 20 41 72 | 72 61 79 28 29 3b 0a 09 |= new Ar|ray();..|
|00002fb0| 7d 0a 09 0a 09 2f 2a 0a | 09 20 2a 20 55 70 64 61 |}..../*.|. * Upda|
|00002fc0| 74 65 73 20 74 68 65 20 | 63 6f 6e 74 65 6e 74 73 |tes the |contents|
|00002fd0| 20 6f 66 20 74 68 65 20 | 70 72 65 76 69 65 77 20 | of the |preview |
|00002fe0| 70 61 6e 65 0a 09 20 2a | 2f 0a 09 66 75 6e 63 74 |pane.. *|/..funct|
|00002ff0| 69 6f 6e 20 5f 75 70 64 | 61 74 65 50 72 65 76 69 |ion _upd|atePrevi|
|00003000| 65 77 28 29 20 7b 0a 09 | 09 69 66 28 5f 70 72 65 |ew() {..|.if(_pre|
|00003010| 76 69 65 77 53 68 6f 77 | 6e 29 20 7b 0a 09 09 09 |viewShow|n) {....|
|00003020| 76 61 72 20 65 64 69 74 | 6f 72 20 3d 20 64 6f 63 |var edit|or = doc|
|00003030| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|00003040| 42 79 49 64 28 27 65 64 | 69 74 6f 72 27 29 3b 0a |ById('ed|itor');.|
|00003050| 09 09 09 5f 67 65 74 43 | 69 74 61 74 69 6f 6e 28 |..._getC|itation(|
|00003060| 29 3b 0a 09 09 09 0a 09 | 09 09 65 64 69 74 6f 72 |);......|..editor|
|00003070| 2e 72 65 61 64 6f 6e 6c | 79 20 3d 20 21 69 6f 2e |.readonl|y = !io.|
|00003080| 63 69 74 61 74 69 6f 6e | 2e 63 69 74 61 74 69 6f |citation|.citatio|
|00003090| 6e 49 74 65 6d 73 2e 6c | 65 6e 67 74 68 3b 0a 09 |nItems.l|ength;..|
|000030a0| 09 09 65 64 69 74 6f 72 | 2e 76 61 6c 75 65 20 3d |..editor|.value =|
|000030b0| 20 5f 6f 72 69 67 69 6e | 61 6c 48 54 4d 4c 20 3d | _origin|alHTML =|
|000030c0| 20 28 69 6f 2e 63 69 74 | 61 74 69 6f 6e 2e 63 69 | (io.cit|ation.ci|
|000030d0| 74 61 74 69 6f 6e 49 74 | 65 6d 73 2e 6c 65 6e 67 |tationIt|ems.leng|
|000030e0| 74 68 20 3f 20 69 6f 2e | 70 72 65 76 69 65 77 46 |th ? io.|previewF|
|000030f0| 75 6e 63 74 69 6f 6e 28 | 29 20 3a 20 22 22 29 3b |unction(|) : "");|
|00003100| 0a 09 09 7d 0a 09 7d 0a | 09 0a 09 2f 2a 0a 09 20 |...}..}.|.../*.. |
|00003110| 2a 20 43 6f 6e 74 72 6f | 6c 73 20 77 68 65 74 68 |* Contro|ls wheth|
|00003120| 65 72 20 74 68 65 20 61 | 63 63 65 70 74 20 28 4f |er the a|ccept (O|
|00003130| 4b 29 20 62 75 74 74 6f | 6e 20 73 68 6f 75 6c 64 |K) butto|n should|
|00003140| 20 62 65 20 65 6e 61 62 | 6c 65 64 0a 09 20 2a 2f | be enab|led.. */|
|00003150| 0a 09 66 75 6e 63 74 69 | 6f 6e 20 5f 75 70 64 61 |..functi|on _upda|
|00003160| 74 65 41 63 63 65 70 74 | 28 73 74 61 74 75 73 29 |teAccept|(status)|
|00003170| 20 7b 0a 09 09 69 66 28 | 5f 6d 75 6c 74 69 70 6c | {...if(|_multipl|
|00003180| 65 53 6f 75 72 63 65 73 | 4f 6e 29 20 7b 0a 09 09 |eSources|On) {...|
|00003190| 09 5f 61 63 63 65 70 74 | 42 75 74 74 6f 6e 2e 64 |._accept|Button.d|
|000031a0| 69 73 61 62 6c 65 64 20 | 3d 20 21 64 6f 63 75 6d |isabled |= !docum|
|000031b0| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|000031c0| 49 64 28 22 63 69 74 61 | 74 69 6f 6e 2d 6c 69 73 |Id("cita|tion-lis|
|000031d0| 74 22 29 2e 63 68 69 6c | 64 4e 6f 64 65 73 2e 6c |t").chil|dNodes.l|
|000031e0| 65 6e 67 74 68 3b 0a 09 | 09 7d 20 65 6c 73 65 20 |ength;..|.} else |
|000031f0| 7b 0a 09 09 09 5f 61 63 | 63 65 70 74 42 75 74 74 |{...._ac|ceptButt|
|00003200| 6f 6e 2e 64 69 73 61 62 | 6c 65 64 20 3d 20 21 69 |on.disab|led = !i|
|00003210| 74 65 6d 73 56 69 65 77 | 2e 67 65 74 53 65 6c 65 |temsView|.getSele|
|00003220| 63 74 65 64 49 74 65 6d | 73 28 29 2e 6c 65 6e 67 |ctedItem|s().leng|
|00003230| 74 68 3b 20 2f 2f 20 74 | 72 65 65 76 69 65 77 20 |th; // t|reeview |
|00003240| 66 72 6f 6d 20 73 65 6c | 65 63 74 49 74 65 6d 73 |from sel|ectItems|
|00003250| 44 69 61 6c 6f 67 2e 6a | 73 0a 09 09 7d 0a 09 7d |Dialog.j|s...}..}|
|00003260| 0a 09 0a 09 2f 2a 0a 09 | 20 2a 20 63 61 6c 6c 65 |..../*..| * calle|
|00003270| 64 20 77 68 65 6e 20 61 | 6e 20 69 74 65 6d 20 69 |d when a|n item i|
|00003280| 73 20 73 65 6c 65 63 74 | 65 64 3b 20 69 66 20 69 |s select|ed; if i|
|00003290| 74 65 6d 49 44 20 69 73 | 20 66 61 6c 73 65 2c 20 |temID is| false, |
|000032a0| 64 69 73 61 62 6c 65 73 | 20 66 69 65 6c 64 73 3b |disables| fields;|
|000032b0| 20 69 66 0a 09 20 2a 20 | 69 74 65 6d 49 44 20 69 | if.. * |itemID i|
|000032c0| 73 20 75 6e 64 65 66 69 | 6e 65 64 2c 20 6f 6e 6c |s undefi|ned, onl|
|000032d0| 79 20 75 70 64 61 74 65 | 73 20 5f 69 74 65 6d 44 |y update|s _itemD|
|000032e0| 61 74 61 20 61 72 72 61 | 79 0a 09 20 2a 2f 0a 09 |ata arra|y.. */..|
|000032f0| 66 75 6e 63 74 69 6f 6e | 20 5f 69 74 65 6d 53 65 |function| _itemSe|
|00003300| 6c 65 63 74 65 64 28 69 | 74 65 6d 49 44 29 20 7b |lected(i|temID) {|
|00003310| 0a 09 09 69 66 28 5f 6c | 61 73 74 53 65 6c 65 63 |...if(_l|astSelec|
|00003320| 74 65 64 20 26 26 20 21 | 5f 69 74 65 6d 44 61 74 |ted && !|_itemDat|
|00003330| 61 5b 5f 6c 61 73 74 53 | 65 6c 65 63 74 65 64 5d |a[_lastS|elected]|
|00003340| 29 20 7b 0a 09 09 09 5f | 69 74 65 6d 44 61 74 61 |) {...._|itemData|
|00003350| 5b 5f 6c 61 73 74 53 65 | 6c 65 63 74 65 64 5d 20 |[_lastSe|lected] |
|00003360| 3d 20 6e 65 77 20 4f 62 | 6a 65 63 74 28 29 3b 0a |= new Ob|ject();.|
|00003370| 09 09 7d 0a 09 09 0a 09 | 09 66 6f 72 28 76 61 72 |..}.....|.for(var|
|00003380| 20 62 6f 78 20 69 6e 20 | 5f 70 72 65 73 65 72 76 | box in |_preserv|
|00003390| 65 44 61 74 61 29 20 7b | 0a 09 09 09 76 61 72 20 |eData) {|....var |
|000033a0| 64 6f 6d 42 6f 78 20 3d | 20 64 6f 63 75 6d 65 6e |domBox =| documen|
|000033b0| 74 2e 67 65 74 45 6c 65 | 6d 65 6e 74 42 79 49 64 |t.getEle|mentById|
|000033c0| 28 62 6f 78 29 3b 0a 09 | 09 09 76 61 72 20 70 72 |(box);..|..var pr|
|000033d0| 6f 70 65 72 74 79 20 3d | 20 5f 70 72 65 73 65 72 |operty =| _preser|
|000033e0| 76 65 44 61 74 61 5b 62 | 6f 78 5d 3b 0a 09 09 09 |veData[b|ox];....|
|000033f0| 0a 09 09 09 2f 2f 20 73 | 61 76 65 20 70 72 6f 70 |....// s|ave prop|
|00003400| 65 72 74 79 0a 09 09 09 | 69 66 28 5f 6c 61 73 74 |erty....|if(_last|
|00003410| 53 65 6c 65 63 74 65 64 | 29 20 7b 0a 09 09 09 09 |Selected|) {.....|
|00003420| 69 66 28 70 72 6f 70 65 | 72 74 79 20 3d 3d 20 22 |if(prope|rty == "|
|00003430| 6c 6f 63 61 74 6f 72 54 | 79 70 65 22 29 20 7b 0a |locatorT|ype") {.|
|00003440| 09 09 09 09 09 5f 69 74 | 65 6d 44 61 74 61 5b 5f |....._it|emData[_|
|00003450| 6c 61 73 74 53 65 6c 65 | 63 74 65 64 5d 5b 62 6f |lastSele|cted][bo|
|00003460| 78 5d 20 3d 20 64 6f 6d | 42 6f 78 2e 73 65 6c 65 |x] = dom|Box.sele|
|00003470| 63 74 65 64 49 74 65 6d | 2e 76 61 6c 75 65 3b 0a |ctedItem|.value;.|
|00003480| 09 09 09 09 7d 20 65 6c | 73 65 20 7b 0a 09 09 09 |....} el|se {....|
|00003490| 09 09 5f 69 74 65 6d 44 | 61 74 61 5b 5f 6c 61 73 |.._itemD|ata[_las|
|000034a0| 74 53 65 6c 65 63 74 65 | 64 5d 5b 62 6f 78 5d 20 |tSelecte|d][box] |
|000034b0| 3d 20 64 6f 6d 42 6f 78 | 5b 70 72 6f 70 65 72 74 |= domBox|[propert|
|000034c0| 79 5d 3b 0a 09 09 09 09 | 7d 0a 09 09 09 7d 0a 09 |y];.....|}....}..|
|000034d0| 09 09 2f 2f 20 72 65 73 | 74 6f 72 65 20 70 72 65 |..// res|tore pre|
|000034e0| 76 69 6f 75 73 20 70 72 | 6f 70 65 72 74 79 0a 09 |vious pr|operty..|
|000034f0| 09 09 69 66 28 69 74 65 | 6d 49 44 29 20 7b 0a 09 |..if(ite|mID) {..|
|00003500| 09 09 09 64 6f 6d 42 6f | 78 2e 64 69 73 61 62 6c |...domBo|x.disabl|
|00003510| 65 64 20 3d 20 66 61 6c | 73 65 3b 0a 09 09 09 09 |ed = fal|se;.....|
|00003520| 69 66 28 5f 69 74 65 6d | 44 61 74 61 5b 69 74 65 |if(_item|Data[ite|
|00003530| 6d 49 44 5d 20 26 26 20 | 5f 69 74 65 6d 44 61 74 |mID] && |_itemDat|
|00003540| 61 5b 69 74 65 6d 49 44 | 5d 5b 62 6f 78 5d 20 21 |a[itemID|][box] !|
|00003550| 3d 3d 20 75 6e 64 65 66 | 69 6e 65 64 29 20 7b 0a |== undef|ined) {.|
|00003560| 09 09 09 09 09 69 66 28 | 70 72 6f 70 65 72 74 79 |.....if(|property|
|00003570| 20 3d 3d 20 22 6c 6f 63 | 61 74 6f 72 54 79 70 65 | == "loc|atorType|
|00003580| 22 29 20 7b 0a 09 09 09 | 09 09 09 64 6f 6d 42 6f |") {....|...domBo|
|00003590| 78 5b 70 72 6f 70 65 72 | 74 79 5d 20 3d 20 5f 6c |x[proper|ty] = _l|
|000035a0| 6f 63 61 74 6f 72 49 6e | 64 65 78 41 72 72 61 79 |ocatorIn|dexArray|
|000035b0| 5b 5f 69 74 65 6d 44 61 | 74 61 5b 69 74 65 6d 49 |[_itemDa|ta[itemI|
|000035c0| 44 5d 5b 62 6f 78 5d 5d | 3b 0a 09 09 09 09 09 7d |D][box]]|;......}|
|000035d0| 20 65 6c 73 65 20 7b 0a | 09 09 09 09 09 09 64 6f | else {.|......do|
|000035e0| 6d 42 6f 78 5b 70 72 6f | 70 65 72 74 79 5d 20 3d |mBox[pro|perty] =|
|000035f0| 20 5f 69 74 65 6d 44 61 | 74 61 5b 69 74 65 6d 49 | _itemDa|ta[itemI|
|00003600| 44 5d 5b 62 6f 78 5d 3b | 0a 09 09 09 09 09 7d 0a |D][box];|......}.|
|00003610| 09 09 09 09 7d 0a 09 09 | 09 7d 20 65 6c 73 65 20 |....}...|.} else |
|00003620| 69 66 28 69 74 65 6d 49 | 44 20 21 3d 3d 20 75 6e |if(itemI|D !== un|
|00003630| 64 65 66 69 6e 65 64 29 | 20 7b 0a 09 09 09 09 64 |defined)| {.....d|
|00003640| 6f 6d 42 6f 78 2e 64 69 | 73 61 62 6c 65 64 20 3d |omBox.di|sabled =|
|00003650| 20 74 72 75 65 3b 0a 09 | 09 09 09 64 6f 6d 42 6f | true;..|...domBo|
|00003660| 78 5b 70 72 6f 70 65 72 | 74 79 5d 20 3d 20 22 22 |x[proper|ty] = ""|
|00003670| 3b 0a 09 09 09 7d 0a 09 | 09 7d 0a 09 09 0a 09 09 |;....}..|.}......|
|00003680| 69 66 28 69 74 65 6d 49 | 44 20 21 3d 3d 20 75 6e |if(itemI|D !== un|
|00003690| 64 65 66 69 6e 65 64 29 | 20 5f 6c 61 73 74 53 65 |defined)| _lastSe|
|000036a0| 6c 65 63 74 65 64 20 3d | 20 69 74 65 6d 49 44 3b |lected =| itemID;|
|000036b0| 0a 09 7d 0a 09 0a 09 2f | 2a 0a 09 20 2a 20 75 70 |..}..../|*.. * up|
|000036c0| 64 61 74 65 73 20 69 6f | 2e 63 69 74 61 74 69 6f |dates io|.citatio|
|000036d0| 6e 20 74 6f 20 72 65 66 | 6c 65 63 74 20 73 65 6c |n to ref|lect sel|
|000036e0| 65 63 74 65 64 20 69 74 | 65 6d 73 0a 09 20 2a 2f |ected it|ems.. */|
|000036f0| 0a 09 66 75 6e 63 74 69 | 6f 6e 20 5f 67 65 74 43 |..functi|on _getC|
|00003700| 69 74 61 74 69 6f 6e 28 | 29 20 7b 0a 09 09 69 6f |itation(|) {...io|
|00003710| 2e 63 69 74 61 74 69 6f | 6e 2e 63 69 74 61 74 69 |.citatio|n.citati|
|00003720| 6f 6e 49 74 65 6d 73 20 | 3d 20 6e 65 77 20 41 72 |onItems |= new Ar|
|00003730| 72 61 79 28 29 3b 0a 09 | 09 0a 09 09 2f 2f 20 75 |ray();..|....// u|
|00003740| 73 65 20 74 6f 20 6d 61 | 70 20 73 65 6c 65 63 74 |se to ma|p select|
|00003750| 65 64 49 6e 64 65 78 65 | 73 20 62 61 63 6b 20 74 |edIndexe|s back t|
|00003760| 6f 20 70 61 67 65 2f 70 | 61 72 61 67 72 61 70 68 |o page/p|aragraph|
|00003770| 2f 6c 69 6e 65 0a 09 09 | 76 61 72 20 6c 6f 63 61 |/line...|var loca|
|00003780| 74 6f 72 54 79 70 65 45 | 6c 65 6d 65 6e 74 73 20 |torTypeE|lements |
|00003790| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c |= docume|nt.getEl|
|000037a0| 65 6d 65 6e 74 42 79 49 | 64 28 22 6c 6f 63 61 74 |ementByI|d("locat|
|000037b0| 6f 72 54 79 70 65 22 29 | 2e 67 65 74 45 6c 65 6d |orType")|.getElem|
|000037c0| 65 6e 74 73 42 79 54 61 | 67 4e 61 6d 65 28 22 6d |entsByTa|gName("m|
|000037d0| 65 6e 75 69 74 65 6d 22 | 29 3b 0a 09 09 69 66 28 |enuitem"|);...if(|
|000037e0| 5f 6d 75 6c 74 69 70 6c | 65 53 6f 75 72 63 65 73 |_multipl|eSources|
|000037f0| 4f 6e 29 20 7b 0a 09 09 | 09 5f 69 74 65 6d 53 65 |On) {...|._itemSe|
|00003800| 6c 65 63 74 65 64 28 29 | 3b 09 09 2f 2f 20 73 74 |lected()|;..// st|
|00003810| 6f 72 65 20 6c 6f 63 61 | 74 6f 72 20 69 6e 66 6f |ore loca|tor info|
|00003820| 0a 09 09 09 0a 09 09 09 | 76 61 72 20 63 69 74 61 |........|var cita|
|00003830| 74 69 6f 6e 4c 69 73 74 | 20 3d 20 64 6f 63 75 6d |tionList| = docum|
|00003840| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00003850| 49 64 28 22 63 69 74 61 | 74 69 6f 6e 2d 6c 69 73 |Id("cita|tion-lis|
|00003860| 74 22 29 3b 0a 09 09 09 | 76 61 72 20 6c 69 73 74 |t");....|var list|
|00003870| 4c 65 6e 67 74 68 20 3d | 20 63 69 74 61 74 69 6f |Length =| citatio|
|00003880| 6e 4c 69 73 74 2e 63 68 | 69 6c 64 4e 6f 64 65 73 |nList.ch|ildNodes|
|00003890| 2e 6c 65 6e 67 74 68 3b | 0a 09 09 09 0a 09 09 09 |.length;|........|
|000038a0| 76 61 72 20 63 69 74 61 | 74 69 6f 6e 49 74 65 6d |var cita|tionItem|
|000038b0| 73 20 3d 20 6e 65 77 20 | 41 72 72 61 79 28 29 3b |s = new |Array();|
|000038c0| 0a 09 09 09 69 66 28 6c | 69 73 74 4c 65 6e 67 74 |....if(l|istLengt|
|000038d0| 68 29 20 7b 0a 09 09 09 | 09 2f 2f 20 67 65 6e 65 |h) {....|.// gene|
|000038e0| 72 61 74 65 20 63 69 74 | 61 74 69 6f 6e 49 74 65 |rate cit|ationIte|
|000038f0| 6d 73 0a 09 09 09 09 66 | 6f 72 28 76 61 72 20 69 |ms.....f|or(var i|
|00003900| 3d 30 3b 20 69 3c 6c 69 | 73 74 4c 65 6e 67 74 68 |=0; i<li|stLength|
|00003910| 3b 20 69 2b 2b 29 20 7b | 0a 09 09 09 09 09 76 61 |; i++) {|......va|
|00003920| 72 20 69 74 65 6d 49 44 | 20 3d 20 63 69 74 61 74 |r itemID| = citat|
|00003930| 69 6f 6e 4c 69 73 74 2e | 63 68 69 6c 64 4e 6f 64 |ionList.|childNod|
|00003940| 65 73 5b 69 5d 2e 76 61 | 6c 75 65 3b 0a 09 09 09 |es[i].va|lue;....|
|00003950| 09 09 0a 09 09 09 09 09 | 76 61 72 20 63 69 74 61 |........|var cita|
|00003960| 74 69 6f 6e 49 74 65 6d | 20 3d 20 5f 69 74 65 6d |tionItem| = _item|
|00003970| 44 61 74 61 5b 69 74 65 | 6d 49 44 5d 3b 0a 09 09 |Data[ite|mID];...|
|00003980| 09 09 09 63 69 74 61 74 | 69 6f 6e 49 74 65 6d 2e |...citat|ionItem.|
|00003990| 69 74 65 6d 49 44 20 3d | 20 69 74 65 6d 49 44 3b |itemID =| itemID;|
|000039a0| 0a 09 09 09 09 09 69 6f | 2e 63 69 74 61 74 69 6f |......io|.citatio|
|000039b0| 6e 2e 63 69 74 61 74 69 | 6f 6e 49 74 65 6d 73 2e |n.citati|onItems.|
|000039c0| 70 75 73 68 28 63 69 74 | 61 74 69 6f 6e 49 74 65 |push(cit|ationIte|
|000039d0| 6d 29 3b 0a 09 09 09 09 | 7d 0a 09 09 09 7d 0a 09 |m);.....|}....}..|
|000039e0| 09 7d 20 65 6c 73 65 20 | 7b 0a 09 09 09 76 61 72 |.} else |{....var|
|000039f0| 20 69 74 65 6d 73 20 3d | 20 69 74 65 6d 73 56 69 | items =| itemsVi|
|00003a00| 65 77 2e 67 65 74 53 65 | 6c 65 63 74 65 64 49 74 |ew.getSe|lectedIt|
|00003a10| 65 6d 73 28 74 72 75 65 | 29 3b 20 2f 2f 20 74 72 |ems(true|); // tr|
|00003a20| 65 65 76 69 65 77 20 66 | 72 6f 6d 20 73 65 6c 65 |eeview f|rom sele|
|00003a30| 63 74 49 74 65 6d 73 44 | 69 61 6c 6f 67 2e 6a 73 |ctItemsD|ialog.js|
|00003a40| 0a 09 09 09 0a 09 09 09 | 76 61 72 20 63 69 74 61 |........|var cita|
|00003a50| 74 69 6f 6e 49 74 65 6d | 20 3d 20 6e 65 77 20 5a |tionItem| = new Z|
|00003a60| 6f 74 65 72 6f 2e 43 53 | 4c 2e 43 69 74 61 74 69 |otero.CS|L.Citati|
|00003a70| 6f 6e 49 74 65 6d 28 29 | 3b 0a 09 09 09 63 69 74 |onItem()|;....cit|
|00003a80| 61 74 69 6f 6e 49 74 65 | 6d 2e 69 74 65 6d 49 44 |ationIte|m.itemID|
|00003a90| 20 3d 20 69 74 65 6d 73 | 5b 30 5d 3b 0a 09 09 09 | = items|[0];....|
|00003aa0| 66 6f 72 28 76 61 72 20 | 70 72 6f 70 65 72 74 79 |for(var |property|
|00003ab0| 20 69 6e 20 5f 70 72 65 | 73 65 72 76 65 44 61 74 | in _pre|serveDat|
|00003ac0| 61 29 20 7b 0a 09 09 09 | 09 69 66 28 70 72 6f 70 |a) {....|.if(prop|
|00003ad0| 65 72 74 79 20 3d 3d 20 | 22 6c 6f 63 61 74 6f 72 |erty == |"locator|
|00003ae0| 54 79 70 65 22 29 20 7b | 0a 09 09 09 09 09 63 69 |Type") {|......ci|
|00003af0| 74 61 74 69 6f 6e 49 74 | 65 6d 5b 70 72 6f 70 65 |tationIt|em[prope|
|00003b00| 72 74 79 5d 20 3d 20 64 | 6f 63 75 6d 65 6e 74 2e |rty] = d|ocument.|
|00003b10| 67 65 74 45 6c 65 6d 65 | 6e 74 42 79 49 64 28 70 |getEleme|ntById(p|
|00003b20| 72 6f 70 65 72 74 79 29 | 2e 73 65 6c 65 63 74 65 |roperty)|.selecte|
|00003b30| 64 49 74 65 6d 2e 76 61 | 6c 75 65 3b 0a 09 09 09 |dItem.va|lue;....|
|00003b40| 09 7d 20 65 6c 73 65 20 | 7b 0a 09 09 09 09 09 63 |.} else |{......c|
|00003b50| 69 74 61 74 69 6f 6e 49 | 74 65 6d 5b 70 72 6f 70 |itationI|tem[prop|
|00003b60| 65 72 74 79 5d 20 3d 20 | 64 6f 63 75 6d 65 6e 74 |erty] = |document|
|00003b70| 2e 67 65 74 45 6c 65 6d | 65 6e 74 42 79 49 64 28 |.getElem|entById(|
|00003b80| 70 72 6f 70 65 72 74 79 | 29 5b 5f 70 72 65 73 65 |property|)[_prese|
|00003b90| 72 76 65 44 61 74 61 5b | 70 72 6f 70 65 72 74 79 |rveData[|property|
|00003ba0| 5d 5d 3b 0a 09 09 09 09 | 7d 0a 09 09 09 7d 0a 09 |]];.....|}....}..|
|00003bb0| 09 09 0a 09 09 09 69 66 | 28 63 69 74 61 74 69 6f |......if|(citatio|
|00003bc0| 6e 49 74 65 6d 5b 22 6c | 6f 63 61 74 6f 72 22 5d |nItem["l|ocator"]|
|00003bd0| 20 3d 3d 20 22 22 29 20 | 7b 0a 09 09 09 09 63 69 | == "") |{.....ci|
|00003be0| 74 61 74 69 6f 6e 49 74 | 65 6d 5b 22 6c 6f 63 61 |tationIt|em["loca|
|00003bf0| 74 6f 72 22 5d 20 3d 20 | 63 69 74 61 74 69 6f 6e |tor"] = |citation|
|00003c00| 49 74 65 6d 5b 22 6c 6f | 63 61 74 6f 72 54 79 70 |Item["lo|catorTyp|
|00003c10| 65 22 5d 20 3d 20 75 6e | 64 65 66 69 6e 65 64 3b |e"] = un|defined;|
|00003c20| 0a 09 09 09 7d 0a 09 09 | 09 0a 09 09 09 69 6f 2e |....}...|.....io.|
|00003c30| 63 69 74 61 74 69 6f 6e | 2e 63 69 74 61 74 69 6f |citation|.citatio|
|00003c40| 6e 49 74 65 6d 73 20 3d | 20 5b 63 69 74 61 74 69 |nItems =| [citati|
|00003c50| 6f 6e 49 74 65 6d 5d 3b | 0a 09 09 7d 0a 09 7d 0a |onItem];|...}..}.|
|00003c60| 09 0a 09 2f 2a 0a 09 20 | 2a 20 41 64 64 20 61 6e |.../*.. |* Add an|
|00003c70| 20 69 74 65 6d 20 74 6f | 20 74 68 65 20 69 74 65 | item to| the ite|
|00003c80| 6d 20 6c 69 73 74 20 28 | 6d 75 6c 74 69 70 6c 65 |m list (|multiple|
|00003c90| 20 73 6f 75 72 63 65 73 | 20 6f 6e 6c 79 29 0a 09 | sources| only)..|
|00003ca0| 20 2a 2f 0a 09 66 75 6e | 63 74 69 6f 6e 20 5f 61 | */..fun|ction _a|
|00003cb0| 64 64 49 74 65 6d 28 69 | 74 65 6d 29 20 7b 0a 09 |ddItem(i|tem) {..|
|00003cc0| 09 76 61 72 20 69 74 65 | 6d 4e 6f 64 65 20 3d 20 |.var ite|mNode = |
|00003cd0| 64 6f 63 75 6d 65 6e 74 | 2e 63 72 65 61 74 65 45 |document|.createE|
|00003ce0| 6c 65 6d 65 6e 74 28 22 | 6c 69 73 74 69 74 65 6d |lement("|listitem|
|00003cf0| 22 29 3b 0a 09 09 69 74 | 65 6d 4e 6f 64 65 2e 73 |");...it|emNode.s|
|00003d00| 65 74 41 74 74 72 69 62 | 75 74 65 28 22 76 61 6c |etAttrib|ute("val|
|00003d10| 75 65 22 2c 20 69 74 65 | 6d 2e 67 65 74 49 44 28 |ue", ite|m.getID(|
|00003d20| 29 29 3b 0a 09 09 69 74 | 65 6d 4e 6f 64 65 2e 73 |));...it|emNode.s|
|00003d30| 65 74 41 74 74 72 69 62 | 75 74 65 28 22 6c 61 62 |etAttrib|ute("lab|
|00003d40| 65 6c 22 2c 20 69 74 65 | 6d 2e 67 65 74 46 69 65 |el", ite|m.getFie|
|00003d50| 6c 64 28 22 74 69 74 6c | 65 22 29 29 3b 0a 09 09 |ld("titl|e"));...|
|00003d60| 69 74 65 6d 4e 6f 64 65 | 2e 73 65 74 41 74 74 72 |itemNode|.setAttr|
|00003d70| 69 62 75 74 65 28 22 63 | 6c 61 73 73 22 2c 20 22 |ibute("c|lass", "|
|00003d80| 6c 69 73 74 69 74 65 6d | 2d 69 63 6f 6e 69 63 22 |listitem|-iconic"|
|00003d90| 29 3b 0a 09 09 69 74 65 | 6d 4e 6f 64 65 2e 73 65 |);...ite|mNode.se|
|00003da0| 74 41 74 74 72 69 62 75 | 74 65 28 22 69 6d 61 67 |tAttribu|te("imag|
|00003db0| 65 22 2c 20 69 74 65 6d | 2e 67 65 74 49 6d 61 67 |e", item|.getImag|
|00003dc0| 65 53 72 63 28 29 29 3b | 0a 09 09 64 6f 63 75 6d |eSrc());|...docum|
|00003dd0| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00003de0| 49 64 28 22 63 69 74 61 | 74 69 6f 6e 2d 6c 69 73 |Id("cita|tion-lis|
|00003df0| 74 22 29 2e 61 70 70 65 | 6e 64 43 68 69 6c 64 28 |t").appe|ndChild(|
|00003e00| 69 74 65 6d 4e 6f 64 65 | 29 3b 0a 09 7d 0a 09 0a |itemNode|);..}...|
|00003e10| 09 2f 2a 0a 09 20 2a 20 | 52 65 6d 6f 76 65 73 20 |./*.. * |Removes |
|00003e20| 61 6c 6c 20 69 74 65 6d | 73 20 66 72 6f 6d 20 74 |all item|s from t|
|00003e30| 68 65 20 6d 75 6c 74 69 | 70 6c 65 20 73 6f 75 72 |he multi|ple sour|
|00003e40| 63 65 73 20 6c 69 73 74 | 0a 09 20 2a 2f 0a 09 66 |ces list|.. */..f|
|00003e50| 75 6e 63 74 69 6f 6e 20 | 5f 63 6c 65 61 72 43 69 |unction |_clearCi|
|00003e60| 74 61 74 69 6f 6e 4c 69 | 73 74 28 29 20 7b 0a 09 |tationLi|st() {..|
|00003e70| 09 76 61 72 20 63 69 74 | 61 74 69 6f 6e 4c 69 73 |.var cit|ationLis|
|00003e80| 74 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 67 65 74 |t = docu|ment.get|
|00003e90| 45 6c 65 6d 65 6e 74 42 | 79 49 64 28 22 63 69 74 |ElementB|yId("cit|
|00003ea0| 61 74 69 6f 6e 2d 6c 69 | 73 74 22 29 3b 0a 09 09 |ation-li|st");...|
|00003eb0| 77 68 69 6c 65 28 63 69 | 74 61 74 69 6f 6e 4c 69 |while(ci|tationLi|
|00003ec0| 73 74 2e 66 69 72 73 74 | 43 68 69 6c 64 29 20 7b |st.first|Child) {|
|00003ed0| 0a 09 09 09 63 69 74 61 | 74 69 6f 6e 4c 69 73 74 |....cita|tionList|
|00003ee0| 2e 72 65 6d 6f 76 65 43 | 68 69 6c 64 28 63 69 74 |.removeC|hild(cit|
|00003ef0| 61 74 69 6f 6e 4c 69 73 | 74 2e 66 69 72 73 74 43 |ationLis|t.firstC|
|00003f00| 68 69 6c 64 29 3b 0a 09 | 09 7d 0a 09 7d 0a 7d 50 |hild);..|.}..}.}P|
|00003f10| 4b 03 04 0a 00 00 00 00 | 00 93 14 55 37 b5 09 16 |K.......|...U7...|
|00003f20| 23 a8 12 00 00 a8 12 00 | 00 28 00 15 00 63 6f 6e |#.......|.(...con|
|00003f30| 74 65 6e 74 2f 7a 6f 74 | 65 72 6f 2f 65 64 69 74 |tent/zot|ero/edit|
|00003f40| 42 69 62 6c 69 6f 67 72 | 61 70 68 79 44 69 61 6c |Bibliogr|aphyDial|
|00003f50| 6f 67 2e 6a 73 55 54 09 | 00 03 75 f3 1a 47 b4 b6 |og.jsUT.|..u..G..|
|00003f60| a3 47 55 78 04 00 1d 09 | 1d 09 2f 2a 0a 20 20 20 |.GUx....|../*. |
|00003f70| 20 2a 2a 2a 2a 2a 20 42 | 45 47 49 4e 20 4c 49 43 | ***** B|EGIN LIC|
|00003f80| 45 4e 53 45 20 42 4c 4f | 43 4b 20 2a 2a 2a 2a 2a |ENSE BLO|CK *****|
|00003f90| 0a 20 20 20 20 0a 20 20 | 20 20 43 6f 70 79 72 69 |. . | Copyri|
|00003fa0| 67 68 74 20 28 63 29 20 | 32 30 30 36 20 20 43 65 |ght (c) |2006 Ce|
|00003fb0| 6e 74 65 72 20 66 6f 72 | 20 48 69 73 74 6f 72 79 |nter for| History|
|00003fc0| 20 61 6e 64 20 4e 65 77 | 20 4d 65 64 69 61 0a 20 | and New| Media. |
|00003fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fe0| 20 20 20 20 20 20 20 47 | 65 6f 72 67 65 20 4d 61 | G|eorge Ma|
|00003ff0| 73 6f 6e 20 55 6e 69 76 | 65 72 73 69 74 79 2c 20 |son Univ|ersity, |
|00004000| 46 61 69 72 66 61 78 2c | 20 56 69 72 67 69 6e 69 |Fairfax,| Virgini|
|00004010| 61 2c 20 55 53 41 0a 20 | 20 20 20 20 20 20 20 20 |a, USA. | |
|00004020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 68 | | h|
|00004030| 74 74 70 3a 2f 2f 63 68 | 6e 6d 2e 67 6d 75 2e 65 |ttp://ch|nm.gmu.e|
|00004040| 64 75 0a 20 20 20 20 0a | 20 20 20 20 4c 69 63 65 |du. .| Lice|
|00004050| 6e 73 65 64 20 75 6e 64 | 65 72 20 74 68 65 20 45 |nsed und|er the E|
|00004060| 64 75 63 61 74 69 6f 6e | 61 6c 20 43 6f 6d 6d 75 |ducation|al Commu|
|00004070| 6e 69 74 79 20 4c 69 63 | 65 6e 73 65 2c 20 56 65 |nity Lic|ense, Ve|
|00004080| 72 73 69 6f 6e 20 31 2e | 30 20 28 74 68 65 20 22 |rsion 1.|0 (the "|
|00004090| 4c 69 63 65 6e 73 65 22 | 29 3b 0a 20 20 20 20 79 |License"|);. y|
|000040a0| 6f 75 20 6d 61 79 20 6e | 6f 74 20 75 73 65 20 74 |ou may n|ot use t|
|000040b0| 68 69 73 20 66 69 6c 65 | 20 65 78 63 65 70 74 20 |his file| except |
|000040c0| 69 6e 20 63 6f 6d 70 6c | 69 61 6e 63 65 20 77 69 |in compl|iance wi|
|000040d0| 74 68 20 74 68 65 20 4c | 69 63 65 6e 73 65 2e 0a |th the L|icense..|
|000040e0| 20 20 20 20 59 6f 75 20 | 6d 61 79 20 6f 62 74 61 | You |may obta|
|000040f0| 69 6e 20 61 20 63 6f 70 | 79 20 6f 66 20 74 68 65 |in a cop|y of the|
|00004100| 20 4c 69 63 65 6e 73 65 | 20 61 74 0a 20 20 20 20 | License| at. |
|00004110| 0a 20 20 20 20 68 74 74 | 70 3a 2f 2f 77 77 77 2e |. htt|p://www.|
|00004120| 6f 70 65 6e 73 6f 75 72 | 63 65 2e 6f 72 67 2f 6c |opensour|ce.org/l|
|00004130| 69 63 65 6e 73 65 73 2f | 65 63 6c 31 2e 70 68 70 |icenses/|ecl1.php|
|00004140| 0a 20 20 20 20 0a 20 20 | 20 20 55 6e 6c 65 73 73 |. . | Unless|
|00004150| 20 72 65 71 75 69 72 65 | 64 20 62 79 20 61 70 70 | require|d by app|
|00004160| 6c 69 63 61 62 6c 65 20 | 6c 61 77 20 6f 72 20 61 |licable |law or a|
|00004170| 67 72 65 65 64 20 74 6f | 20 69 6e 20 77 72 69 74 |greed to| in writ|
|00004180| 69 6e 67 2c 20 73 6f 66 | 74 77 61 72 65 0a 20 20 |ing, sof|tware. |
|00004190| 20 20 64 69 73 74 72 69 | 62 75 74 65 64 20 75 6e | distri|buted un|
|000041a0| 64 65 72 20 74 68 65 20 | 4c 69 63 65 6e 73 65 20 |der the |License |
|000041b0| 69 73 20 64 69 73 74 72 | 69 62 75 74 65 64 20 6f |is distr|ibuted o|
|000041c0| 6e 20 61 6e 20 22 41 53 | 20 49 53 22 20 42 41 53 |n an "AS| IS" BAS|
|000041d0| 49 53 2c 0a 20 20 20 20 | 57 49 54 48 4f 55 54 20 |IS,. |WITHOUT |
|000041e0| 57 41 52 52 41 4e 54 49 | 45 53 20 4f 52 20 43 4f |WARRANTI|ES OR CO|
|000041f0| 4e 44 49 54 49 4f 4e 53 | 20 4f 46 20 41 4e 59 20 |NDITIONS| OF ANY |
|00004200| 4b 49 4e 44 2c 20 65 69 | 74 68 65 72 20 65 78 70 |KIND, ei|ther exp|
|00004210| 72 65 73 73 20 6f 72 20 | 69 6d 70 6c 69 65 64 2e |ress or |implied.|
|00004220| 0a 20 20 20 20 53 65 65 | 20 74 68 65 20 4c 69 63 |. See| the Lic|
|00004230| 65 6e 73 65 20 66 6f 72 | 20 74 68 65 20 73 70 65 |ense for| the spe|
|00004240| 63 69 66 69 63 20 6c 61 | 6e 67 75 61 67 65 20 67 |cific la|nguage g|
|00004250| 6f 76 65 72 6e 69 6e 67 | 20 70 65 72 6d 69 73 73 |overning| permiss|
|00004260| 69 6f 6e 73 20 61 6e 64 | 0a 20 20 20 20 6c 69 6d |ions and|. lim|
|00004270| 69 74 61 74 69 6f 6e 73 | 20 75 6e 64 65 72 20 74 |itations| under t|
|00004280| 68 65 20 4c 69 63 65 6e | 73 65 2e 0a 20 20 20 20 |he Licen|se.. |
|00004290| 0a 20 20 20 20 2a 2a 2a | 2a 2a 20 45 4e 44 20 4c |. ***|** END L|
|000042a0| 49 43 45 4e 53 45 20 42 | 4c 4f 43 4b 20 2a 2a 2a |ICENSE B|LOCK ***|
|000042b0| 2a 2a 0a 2a 2f 0a 0a 76 | 61 72 20 5a 6f 74 65 72 |**.*/..v|ar Zoter|
|000042c0| 6f 5f 42 69 62 6c 69 6f | 67 72 61 70 68 79 5f 44 |o_Biblio|graphy_D|
|000042d0| 69 61 6c 6f 67 20 3d 20 | 6e 65 77 20 66 75 6e 63 |ialog = |new func|
|000042e0| 74 69 6f 6e 20 28 29 20 | 7b 0a 09 76 61 72 20 62 |tion () |{..var b|
|000042f0| 69 62 45 64 69 74 49 6e | 74 65 72 66 61 63 65 3b |ibEditIn|terface;|
|00004300| 0a 09 76 61 72 20 69 74 | 65 6d 53 65 74 3b 0a 09 |..var it|emSet;..|
|00004310| 76 61 72 20 5f 6f 72 69 | 67 69 6e 61 6c 42 69 62 |var _ori|ginalBib|
|00004320| 45 6e 74 72 79 3b 0a 09 | 76 61 72 20 5f 6c 61 73 |Entry;..|var _las|
|00004330| 74 53 65 6c 65 63 74 65 | 64 49 74 65 6d 3b 0a 09 |tSelecte|dItem;..|
|00004340| 0a 09 74 68 69 73 2e 6c | 6f 61 64 20 3d 20 6c 6f |..this.l|oad = lo|
|00004350| 61 64 3b 0a 09 74 68 69 | 73 2e 74 72 65 65 49 74 |ad;..thi|s.treeIt|
|00004360| 65 6d 53 65 6c 65 63 74 | 65 64 20 3d 20 74 72 65 |emSelect|ed = tre|
|00004370| 65 49 74 65 6d 53 65 6c | 65 63 74 65 64 3b 0a 09 |eItemSel|ected;..|
|00004380| 74 68 69 73 2e 6c 69 73 | 74 49 74 65 6d 53 65 6c |this.lis|tItemSel|
|00004390| 65 63 74 65 64 20 3d 20 | 6c 69 73 74 49 74 65 6d |ected = |listItem|
|000043a0| 53 65 6c 65 63 74 65 64 | 3b 0a 09 74 68 69 73 2e |Selected|;..this.|
|000043b0| 61 64 64 20 3d 20 61 64 | 64 3b 0a 09 74 68 69 73 |add = ad|d;..this|
|000043c0| 2e 72 65 6d 6f 76 65 20 | 3d 20 72 65 6d 6f 76 65 |.remove |= remove|
|000043d0| 3b 0a 09 74 68 69 73 2e | 61 63 63 65 70 74 20 3d |;..this.|accept =|
|000043e0| 20 61 63 63 65 70 74 3b | 0a 09 0a 09 2f 2a 0a 09 | accept;|..../*..|
|000043f0| 20 2a 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 61 64 | * initi|alize ad|
|00004400| 64 20 63 69 74 61 74 69 | 6f 6e 20 64 69 61 6c 6f |d citati|on dialo|
|00004410| 67 0a 09 20 2a 2f 0a 09 | 66 75 6e 63 74 69 6f 6e |g.. */..|function|
|00004420| 20 6c 6f 61 64 28 29 20 | 7b 0a 09 09 64 6f 63 75 | load() |{...docu|
|00004430| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00004440| 79 49 64 28 27 65 64 69 | 74 6f 72 27 29 2e 66 6f |yId('edi|tor').fo|
|00004450| 72 6d 61 74 20 3d 20 22 | 49 6e 74 65 67 72 61 74 |rmat = "|Integrat|
|00004460| 69 6f 6e 22 3b 0a 09 09 | 0a 09 09 69 66 28 5a 6f |ion";...|...if(Zo|
|00004470| 74 65 72 6f 2e 69 73 57 | 69 6e 29 20 7b 0a 09 09 |tero.isW|in) {...|
|00004480| 09 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 |.documen|t.getEle|
|00004490| 6d 65 6e 74 42 79 49 64 | 28 22 7a 6f 74 65 72 6f |mentById|("zotero|
|000044a0| 2d 73 65 6c 65 63 74 2d | 69 74 65 6d 73 2d 63 6f |-select-|items-co|
|000044b0| 6e 74 61 69 6e 65 72 22 | 29 2e 73 74 79 6c 65 2e |ntainer"|).style.|
|000044c0| 62 6f 72 64 65 72 20 3d | 20 22 31 70 78 20 73 6f |border =| "1px so|
|000044d0| 6c 69 64 20 62 6c 61 63 | 6b 22 3b 0a 09 09 7d 0a |lid blac|k";...}.|
|000044e0| 09 09 62 69 62 45 64 69 | 74 49 6e 74 65 72 66 61 |..bibEdi|tInterfa|
|000044f0| 63 65 20 3d 20 77 69 6e | 64 6f 77 2e 61 72 67 75 |ce = win|dow.argu|
|00004500| 6d 65 6e 74 73 5b 30 5d | 2e 77 72 61 70 70 65 64 |ments[0]|.wrapped|
|00004510| 4a 53 4f 62 6a 65 63 74 | 3b 0a 09 09 69 74 65 6d |JSObject|;...item|
|00004520| 53 65 74 20 3d 20 62 69 | 62 45 64 69 74 49 6e 74 |Set = bi|bEditInt|
|00004530| 65 72 66 61 63 65 2e 67 | 65 74 49 74 65 6d 53 65 |erface.g|etItemSe|
|00004540| 74 28 29 3b 0a 09 09 0a | 09 09 2f 2f 20 6c 6f 61 |t();....|..// loa|
|00004550| 64 20 28 66 72 6f 6d 20 | 73 65 6c 65 63 74 49 74 |d (from |selectIt|
|00004560| 65 6d 73 44 69 61 6c 6f | 67 2e 6a 73 29 0a 09 09 |emsDialo|g.js)...|
|00004570| 64 6f 4c 6f 61 64 28 29 | 3b 0a 09 09 0a 09 09 2f |doLoad()|;....../|
|00004580| 2f 20 6c 6f 61 64 20 62 | 69 62 6c 69 6f 67 72 61 |/ load b|ibliogra|
|00004590| 70 68 79 20 65 6e 74 69 | 72 65 73 0a 09 09 5f 6c |phy enti|res..._l|
|000045a0| 6f 61 64 49 74 65 6d 73 | 28 29 3b 0a 09 7d 0a 09 |oadItems|();..}..|
|000045b0| 0a 09 2f 2a 0a 09 20 2a | 20 63 61 6c 6c 65 64 20 |../*.. *| called |
|000045c0| 77 68 65 6e 20 61 6e 20 | 69 74 65 6d 20 69 6e 20 |when an |item in |
|000045d0| 74 68 65 20 69 74 65 6d | 20 73 65 6c 65 63 74 69 |the item| selecti|
|000045e0| 6f 6e 20 74 72 65 65 20 | 69 73 20 63 6c 69 63 6b |on tree |is click|
|000045f0| 65 64 0a 09 20 2a 2f 0a | 09 66 75 6e 63 74 69 6f |ed.. */.|.functio|
|00004600| 6e 20 74 72 65 65 49 74 | 65 6d 53 65 6c 65 63 74 |n treeIt|emSelect|
|00004610| 65 64 28 29 20 7b 0a 09 | 09 76 61 72 20 69 74 65 |ed() {..|.var ite|
|00004620| 6d 73 20 3d 20 69 74 65 | 6d 73 56 69 65 77 2e 67 |ms = ite|msView.g|
|00004630| 65 74 53 65 6c 65 63 74 | 65 64 49 74 65 6d 73 28 |etSelect|edItems(|
|00004640| 74 72 75 65 29 3b 20 2f | 2f 20 74 72 65 65 76 69 |true); /|/ treevi|
|00004650| 65 77 20 66 72 6f 6d 20 | 73 65 6c 65 63 74 49 74 |ew from |selectIt|
|00004660| 65 6d 73 44 69 61 6c 6f | 67 2e 6a 73 0a 09 09 0a |emsDialo|g.js....|
|00004670| 09 09 2f 2f 20 64 69 73 | 61 62 6c 65 20 61 64 64 |..// dis|able add|
|00004680| 20 69 66 20 69 74 65 6d | 20 61 6c 72 65 61 64 79 | if item| already|
|00004690| 20 69 6e 20 69 74 65 6d | 53 65 74 0a 09 09 64 6f | in item|Set...do|
|000046a0| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|000046b0| 74 42 79 49 64 28 22 61 | 64 64 22 29 2e 64 69 73 |tById("a|dd").dis|
|000046c0| 61 62 6c 65 64 20 3d 20 | 21 69 74 65 6d 73 2e 6c |abled = |!items.l|
|000046d0| 65 6e 67 74 68 20 7c 7c | 20 69 74 65 6d 53 65 74 |ength ||| itemSet|
|000046e0| 2e 67 65 74 49 74 65 6d | 73 42 79 49 64 73 28 5b |.getItem|sByIds([|
|000046f0| 69 74 65 6d 73 5b 30 5d | 5d 29 5b 30 5d 3b 0a 09 |items[0]|])[0];..|
|00004700| 7d 0a 09 0a 09 2f 2a 0a | 09 20 2a 20 63 61 6c 6c |}..../*.|. * call|
|00004710| 65 64 20 77 68 65 6e 20 | 61 6e 20 69 74 65 6d 20 |ed when |an item |
|00004720| 69 6e 20 74 68 65 20 72 | 65 66 65 72 65 6e 63 65 |in the r|eference|
|00004730| 20 6c 69 73 74 20 69 73 | 20 63 6c 69 63 6b 65 64 | list is| clicked|
|00004740| 0a 09 20 2a 2f 0a 09 66 | 75 6e 63 74 69 6f 6e 20 |.. */..f|unction |
|00004750| 6c 69 73 74 49 74 65 6d | 53 65 6c 65 63 74 65 64 |listItem|Selected|
|00004760| 28 29 20 7b 0a 09 09 76 | 61 72 20 73 65 6c 65 63 |() {...v|ar selec|
|00004770| 74 65 64 4c 69 73 74 49 | 74 65 6d 20 3d 20 64 6f |tedListI|tem = do|
|00004780| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|00004790| 74 42 79 49 64 28 22 69 | 74 65 6d 2d 6c 69 73 74 |tById("i|tem-list|
|000047a0| 22 29 2e 67 65 74 53 65 | 6c 65 63 74 65 64 49 74 |").getSe|lectedIt|
|000047b0| 65 6d 28 30 29 3b 0a 09 | 09 0a 09 09 2f 2f 20 65 |em(0);..|....// e|
|000047c0| 6e 61 62 6c 65 20 72 65 | 6d 6f 76 65 20 69 66 20 |nable re|move if |
|000047d0| 69 74 65 6d 20 69 73 20 | 73 65 6c 65 63 74 65 64 |item is |selected|
|000047e0| 0a 09 09 64 6f 63 75 6d | 65 6e 74 2e 67 65 74 45 |...docum|ent.getE|
|000047f0| 6c 65 6d 65 6e 74 42 79 | 49 64 28 22 72 65 6d 6f |lementBy|Id("remo|
|00004800| 76 65 22 29 2e 64 69 73 | 61 62 6c 65 64 20 3d 20 |ve").dis|abled = |
|00004810| 21 73 65 6c 65 63 74 65 | 64 4c 69 73 74 49 74 65 |!selecte|dListIte|
|00004820| 6d 3b 0a 09 09 0a 09 09 | 69 66 28 73 65 6c 65 63 |m;......|if(selec|
|00004830| 74 65 64 4c 69 73 74 49 | 74 65 6d 29 20 7b 0a 09 |tedListI|tem) {..|
|00004840| 09 09 5f 75 70 64 61 74 | 65 50 72 65 76 69 65 77 |.._updat|ePreview|
|00004850| 28 69 74 65 6d 53 65 74 | 2e 67 65 74 49 74 65 6d |(itemSet|.getItem|
|00004860| 73 42 79 49 64 73 28 5b | 73 65 6c 65 63 74 65 64 |sByIds([|selected|
|00004870| 4c 69 73 74 49 74 65 6d | 2e 76 61 6c 75 65 5d 29 |ListItem|.value])|
|00004880| 5b 30 5d 29 3b 0a 09 09 | 7d 20 65 6c 73 65 20 7b |[0]);...|} else {|
|00004890| 0a 09 09 09 5f 75 70 64 | 61 74 65 50 72 65 76 69 |...._upd|atePrevi|
|000048a0| 65 77 28 66 61 6c 73 65 | 29 3b 0a 09 09 7d 0a 09 |ew(false|);...}..|
|000048b0| 7d 0a 09 0a 09 2f 2a 0a | 09 20 2a 20 41 64 64 73 |}..../*.|. * Adds|
|000048c0| 20 61 20 63 69 74 61 74 | 69 6f 6e 20 74 6f 20 74 | a citat|ion to t|
|000048d0| 68 65 20 72 65 66 65 72 | 65 6e 63 65 20 6c 69 73 |he refer|ence lis|
|000048e0| 74 0a 09 20 2a 2f 0a 09 | 66 75 6e 63 74 69 6f 6e |t.. */..|function|
|000048f0| 20 61 64 64 28 29 20 7b | 0a 09 09 76 61 72 20 69 | add() {|...var i|
|00004900| 74 65 6d 20 3d 20 69 74 | 65 6d 73 56 69 65 77 2e |tem = it|emsView.|
|00004910| 67 65 74 53 65 6c 65 63 | 74 65 64 49 74 65 6d 73 |getSelec|tedItems|
|00004920| 28 29 5b 30 5d 3b 20 2f | 2f 20 74 72 65 65 76 69 |()[0]; /|/ treevi|
|00004930| 65 77 20 66 72 6f 6d 20 | 73 65 6c 65 63 74 49 74 |ew from |selectIt|
|00004940| 65 6d 73 44 69 61 6c 6f | 67 2e 6a 73 0a 09 09 0a |emsDialo|g.js....|
|00004950| 09 09 62 69 62 45 64 69 | 74 49 6e 74 65 72 66 61 |..bibEdi|tInterfa|
|00004960| 63 65 2e 61 64 64 28 69 | 74 65 6d 29 3b 0a 09 09 |ce.add(i|tem);...|
|00004970| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00004980| 65 6e 74 42 79 49 64 28 | 22 61 64 64 22 29 2e 64 |entById(|"add").d|
|00004990| 69 73 61 62 6c 65 64 20 | 3d 20 74 72 75 65 3b 0a |isabled |= true;.|
|000049a0| 09 09 5f 6c 6f 61 64 49 | 74 65 6d 73 28 29 3b 0a |.._loadI|tems();.|
|000049b0| 09 7d 0a 09 0a 09 2f 2a | 0a 09 20 2a 20 44 65 6c |.}..../*|.. * Del|
|000049c0| 65 74 65 73 20 61 20 63 | 69 74 61 74 69 6f 6e 20 |etes a c|itation |
|000049d0| 66 72 6f 6d 20 74 68 65 | 20 72 65 66 65 72 65 6e |from the| referen|
|000049e0| 63 65 20 6c 69 73 74 0a | 09 20 2a 2f 0a 09 66 75 |ce list.|. */..fu|
|000049f0| 6e 63 74 69 6f 6e 20 72 | 65 6d 6f 76 65 28 29 20 |nction r|emove() |
|00004a00| 7b 0a 09 09 76 61 72 20 | 73 65 6c 65 63 74 65 64 |{...var |selected|
|00004a10| 4c 69 73 74 49 74 65 6d | 20 3d 20 64 6f 63 75 6d |ListItem| = docum|
|00004a20| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00004a30| 49 64 28 22 69 74 65 6d | 2d 6c 69 73 74 22 29 2e |Id("item|-list").|
|00004a40| 67 65 74 53 65 6c 65 63 | 74 65 64 49 74 65 6d 28 |getSelec|tedItem(|
|00004a50| 30 29 3b 0a 09 09 76 61 | 72 20 69 74 65 6d 49 44 |0);...va|r itemID|
|00004a60| 20 3d 20 73 65 6c 65 63 | 74 65 64 4c 69 73 74 49 | = selec|tedListI|
|00004a70| 74 65 6d 2e 76 61 6c 75 | 65 3b 0a 09 09 76 61 72 |tem.valu|e;...var|
|00004a80| 20 69 74 65 6d 20 3d 20 | 69 74 65 6d 53 65 74 2e | item = |itemSet.|
|00004a90| 67 65 74 49 74 65 6d 73 | 42 79 49 64 73 28 5b 69 |getItems|ByIds([i|
|00004aa0| 74 65 6d 49 44 5d 29 5b | 30 5d 3b 0a 09 09 0a 09 |temID])[|0];.....|
|00004ab0| 09 69 66 28 62 69 62 45 | 64 69 74 49 6e 74 65 72 |.if(bibE|ditInter|
|00004ac0| 66 61 63 65 2e 69 73 43 | 69 74 65 64 28 69 74 65 |face.isC|ited(ite|
|00004ad0| 6d 29 29 20 7b 0a 09 09 | 09 76 61 72 20 70 72 6f |m)) {...|.var pro|
|00004ae0| 6d 70 74 53 65 72 76 69 | 63 65 20 3d 20 43 6f 6d |mptServi|ce = Com|
|00004af0| 70 6f 6e 65 6e 74 73 2e | 63 6c 61 73 73 65 73 5b |ponents.|classes[|
|00004b00| 22 40 6d 6f 7a 69 6c 6c | 61 2e 6f 72 67 2f 65 6d |"@mozill|a.org/em|
|00004b10| 62 65 64 63 6f 6d 70 2f | 70 72 6f 6d 70 74 2d 73 |bedcomp/|prompt-s|
|00004b20| 65 72 76 69 63 65 3b 31 | 22 5d 0a 09 09 09 09 09 |ervice;1|"]......|
|00004b30| 09 09 09 09 09 09 2e 67 | 65 74 53 65 72 76 69 63 |.......g|etServic|
|00004b40| 65 28 43 6f 6d 70 6f 6e | 65 6e 74 73 2e 69 6e 74 |e(Compon|ents.int|
|00004b50| 65 72 66 61 63 65 73 2e | 6e 73 49 50 72 6f 6d 70 |erfaces.|nsIPromp|
|00004b60| 74 53 65 72 76 69 63 65 | 29 3b 0a 09 09 09 0a 09 |tService|);......|
|00004b70| 09 09 76 61 72 20 6f 75 | 74 20 3d 20 7b 7d 3b 0a |..var ou|t = {};.|
|00004b80| 09 09 09 76 61 72 20 72 | 65 67 65 6e 65 72 61 74 |...var r|egenerat|
|00004b90| 65 20 3d 20 70 72 6f 6d | 70 74 53 65 72 76 69 63 |e = prom|ptServic|
|00004ba0| 65 2e 63 6f 6e 66 69 72 | 6d 45 78 28 0a 09 09 09 |e.confir|mEx(....|
|00004bb0| 09 77 69 6e 64 6f 77 2c | 0a 09 09 09 09 5a 6f 74 |.window,|.....Zot|
|00004bc0| 65 72 6f 2e 67 65 74 53 | 74 72 69 6e 67 28 27 69 |ero.getS|tring('i|
|00004bd0| 6e 74 65 67 72 61 74 69 | 6f 6e 2e 64 65 6c 65 74 |ntegrati|on.delet|
|00004be0| 65 43 69 74 65 64 49 74 | 65 6d 2e 74 69 74 6c 65 |eCitedIt|em.title|
|00004bf0| 27 29 2c 0a 09 09 09 09 | 5a 6f 74 65 72 6f 2e 67 |'),.....|Zotero.g|
|00004c00| 65 74 53 74 72 69 6e 67 | 28 27 69 6e 74 65 67 72 |etString|('integr|
|00004c10| 61 74 69 6f 6e 2e 64 65 | 6c 65 74 65 43 69 74 65 |ation.de|leteCite|
|00004c20| 64 49 74 65 6d 2e 62 6f | 64 79 27 29 2c 0a 09 09 |dItem.bo|dy'),...|
|00004c30| 09 09 70 72 6f 6d 70 74 | 53 65 72 76 69 63 65 2e |..prompt|Service.|
|00004c40| 53 54 44 5f 4f 4b 5f 43 | 41 4e 43 45 4c 5f 42 55 |STD_OK_C|ANCEL_BU|
|00004c50| 54 54 4f 4e 53 2b 70 72 | 6f 6d 70 74 53 65 72 76 |TTONS+pr|omptServ|
|00004c60| 69 63 65 2e 42 55 54 54 | 4f 4e 5f 50 4f 53 5f 31 |ice.BUTT|ON_POS_1|
|00004c70| 5f 44 45 46 41 55 4c 54 | 2c 0a 09 09 09 09 6e 75 |_DEFAULT|,.....nu|
|00004c80| 6c 6c 2c 20 6e 75 6c 6c | 2c 20 6e 75 6c 6c 2c 20 |ll, null|, null, |
|00004c90| 6e 75 6c 6c 2c 20 6f 75 | 74 0a 09 09 09 29 3b 0a |null, ou|t....);.|
|00004ca0| 09 09 09 0a 09 09 09 69 | 66 28 72 65 67 65 6e 65 |.......i|f(regene|
|00004cb0| 72 61 74 65 20 21 3d 20 | 30 29 20 72 65 74 75 72 |rate != |0) retur|
|00004cc0| 6e 3b 0a 09 09 7d 0a 09 | 09 0a 09 09 62 69 62 45 |n;...}..|....bibE|
|00004cd0| 64 69 74 49 6e 74 65 72 | 66 61 63 65 2e 72 65 6d |ditInter|face.rem|
|00004ce0| 6f 76 65 28 69 74 65 6d | 29 3b 0a 09 09 5f 6c 6f |ove(item|);..._lo|
|00004cf0| 61 64 49 74 65 6d 73 28 | 29 3b 0a 09 7d 0a 09 0a |adItems(|);..}...|
|00004d00| 09 2f 2a 0a 09 20 2a 20 | 43 61 6c 6c 65 64 20 6f |./*.. * |Called o|
|00004d10| 6e 20 22 41 63 63 65 70 | 74 22 20 62 75 74 74 6f |n "Accep|t" butto|
|00004d20| 6e 0a 09 20 2a 2f 0a 09 | 66 75 6e 63 74 69 6f 6e |n.. */..|function|
|00004d30| 20 61 63 63 65 70 74 28 | 29 20 7b 0a 09 09 5f 75 | accept(|) {..._u|
|00004d40| 70 64 61 74 65 50 72 65 | 76 69 65 77 28 29 3b 0a |pdatePre|view();.|
|00004d50| 09 7d 0a 09 0a 09 2f 2a | 0a 09 20 2a 20 55 70 64 |.}..../*|.. * Upd|
|00004d60| 61 74 65 73 20 74 68 65 | 20 63 6f 6e 74 65 6e 74 |ates the| content|
|00004d70| 73 20 6f 66 20 74 68 65 | 20 70 72 65 76 69 65 77 |s of the| preview|
|00004d80| 20 70 61 6e 65 0a 09 20 | 2a 2f 0a 09 66 75 6e 63 | pane.. |*/..func|
|00004d90| 74 69 6f 6e 20 5f 75 70 | 64 61 74 65 50 72 65 76 |tion _up|datePrev|
|00004da0| 69 65 77 28 69 74 65 6d | 29 20 7b 0a 09 09 76 61 |iew(item|) {...va|
|00004db0| 72 20 65 64 69 74 6f 72 | 20 3d 20 64 6f 63 75 6d |r editor| = docum|
|00004dc0| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00004dd0| 49 64 28 27 65 64 69 74 | 6f 72 27 29 3b 0a 09 09 |Id('edit|or');...|
|00004de0| 0a 09 09 69 66 28 5f 6c | 61 73 74 53 65 6c 65 63 |...if(_l|astSelec|
|00004df0| 74 65 64 49 74 65 6d 20 | 26 26 20 65 64 69 74 6f |tedItem |&& edito|
|00004e00| 72 2e 76 61 6c 75 65 20 | 21 3d 20 5f 6f 72 69 67 |r.value |!= _orig|
|00004e10| 69 6e 61 6c 42 69 62 45 | 6e 74 72 79 29 20 7b 0a |inalBibE|ntry) {.|
|00004e20| 09 09 09 5a 6f 74 65 72 | 6f 2e 64 65 62 75 67 28 |...Zoter|o.debug(|
|00004e30| 22 73 65 74 74 69 6e 67 | 20 62 69 62 6c 69 6f 67 |"setting| bibliog|
|00004e40| 72 61 70 68 79 20 66 6f | 72 20 22 2b 5f 6c 61 73 |raphy fo|r "+_las|
|00004e50| 74 53 65 6c 65 63 74 65 | 64 49 74 65 6d 2e 67 65 |tSelecte|dItem.ge|
|00004e60| 74 49 44 28 29 2b 22 20 | 74 6f 20 22 2b 65 64 69 |tID()+" |to "+edi|
|00004e70| 74 6f 72 2e 76 61 6c 75 | 65 29 3b 0a 09 09 09 5f |tor.valu|e);...._|
|00004e80| 6c 61 73 74 53 65 6c 65 | 63 74 65 64 49 74 65 6d |lastSele|ctedItem|
|00004e90| 2e 73 65 74 50 72 6f 70 | 65 72 74 79 28 22 62 69 |.setProp|erty("bi|
|00004ea0| 62 6c 69 6f 67 72 61 70 | 68 79 2d 49 6e 74 65 67 |bliograp|hy-Integ|
|00004eb0| 72 61 74 69 6f 6e 22 2c | 20 65 64 69 74 6f 72 2e |ration",| editor.|
|00004ec0| 76 61 6c 75 65 29 3b 0a | 09 09 7d 0a 09 09 0a 09 |value);.|..}.....|
|00004ed0| 09 65 64 69 74 6f 72 2e | 72 65 61 64 6f 6e 6c 79 |.editor.|readonly|
|00004ee0| 20 3d 20 21 69 74 65 6d | 3b 0a 09 09 65 64 69 74 | = !item|;...edit|
|00004ef0| 6f 72 2e 76 61 6c 75 65 | 20 3d 20 5f 6f 72 69 67 |or.value| = _orig|
|00004f00| 69 6e 61 6c 42 69 62 45 | 6e 74 72 79 20 3d 20 28 |inalBibE|ntry = (|
|00004f10| 69 74 65 6d 20 3f 20 62 | 69 62 45 64 69 74 49 6e |item ? b|ibEditIn|
|00004f20| 74 65 72 66 61 63 65 2e | 70 72 65 76 69 65 77 28 |terface.|preview(|
|00004f30| 69 74 65 6d 29 20 3a 20 | 22 22 29 3b 0a 09 09 5f |item) : |"");..._|
|00004f40| 6c 61 73 74 53 65 6c 65 | 63 74 65 64 49 74 65 6d |lastSele|ctedItem|
|00004f50| 20 3d 20 69 74 65 6d 3b | 0a 09 7d 0a 09 0a 09 2f | = item;|..}..../|
|00004f60| 2a 0a 09 20 2a 20 6c 6f | 61 64 73 20 69 74 65 6d |*.. * lo|ads item|
|00004f70| 73 20 66 72 6f 6d 20 69 | 74 65 6d 53 65 74 0a 09 |s from i|temSet..|
|00004f80| 20 2a 2f 0a 09 66 75 6e | 63 74 69 6f 6e 20 5f 6c | */..fun|ction _l|
|00004f90| 6f 61 64 49 74 65 6d 73 | 28 29 20 7b 0a 09 09 2f |oadItems|() {.../|
|00004fa0| 2f 20 64 65 6c 65 74 65 | 20 61 6c 6c 20 65 78 69 |/ delete| all exi|
|00004fb0| 73 74 69 6e 67 20 69 74 | 65 6d 73 20 66 72 6f 6d |sting it|ems from|
|00004fc0| 20 6c 69 73 74 0a 09 09 | 76 61 72 20 69 74 65 6d | list...|var item|
|00004fd0| 4c 69 73 74 20 3d 20 64 | 6f 63 75 6d 65 6e 74 2e |List = d|ocument.|
|00004fe0| 67 65 74 45 6c 65 6d 65 | 6e 74 42 79 49 64 28 22 |getEleme|ntById("|
|00004ff0| 69 74 65 6d 2d 6c 69 73 | 74 22 29 3b 0a 09 09 77 |item-lis|t");...w|
|00005000| 68 69 6c 65 28 69 74 65 | 6d 4c 69 73 74 2e 66 69 |hile(ite|mList.fi|
|00005010| 72 73 74 43 68 69 6c 64 | 29 20 7b 0a 09 09 09 69 |rstChild|) {....i|
|00005020| 74 65 6d 4c 69 73 74 2e | 72 65 6d 6f 76 65 43 68 |temList.|removeCh|
|00005030| 69 6c 64 28 69 74 65 6d | 4c 69 73 74 2e 66 69 72 |ild(item|List.fir|
|00005040| 73 74 43 68 69 6c 64 29 | 3b 0a 09 09 7d 0a 09 09 |stChild)|;...}...|
|00005050| 0a 09 09 2f 2f 20 61 64 | 64 20 6e 65 77 20 69 74 |...// ad|d new it|
|00005060| 65 6d 73 0a 09 09 66 6f | 72 28 76 61 72 20 69 3d |ems...fo|r(var i=|
|00005070| 30 3b 20 69 3c 69 74 65 | 6d 53 65 74 2e 69 74 65 |0; i<ite|mSet.ite|
|00005080| 6d 73 2e 6c 65 6e 67 74 | 68 3b 20 69 2b 2b 29 20 |ms.lengt|h; i++) |
|00005090| 7b 0a 09 09 09 76 61 72 | 20 69 74 65 6d 20 3d 20 |{....var| item = |
|000050a0| 69 74 65 6d 53 65 74 2e | 69 74 65 6d 73 5b 69 5d |itemSet.|items[i]|
|000050b0| 2e 7a 6f 74 65 72 6f 49 | 74 65 6d 3b 0a 09 09 09 |.zoteroI|tem;....|
|000050c0| 0a 09 09 09 76 61 72 20 | 69 74 65 6d 4e 6f 64 65 |....var |itemNode|
|000050d0| 20 3d 20 64 6f 63 75 6d | 65 6e 74 2e 63 72 65 61 | = docum|ent.crea|
|000050e0| 74 65 45 6c 65 6d 65 6e | 74 28 22 6c 69 73 74 69 |teElemen|t("listi|
|000050f0| 74 65 6d 22 29 3b 0a 09 | 09 09 69 74 65 6d 4e 6f |tem");..|..itemNo|
|00005100| 64 65 2e 73 65 74 41 74 | 74 72 69 62 75 74 65 28 |de.setAt|tribute(|
|00005110| 22 76 61 6c 75 65 22 2c | 20 69 74 65 6d 2e 67 65 |"value",| item.ge|
|00005120| 74 49 44 28 29 29 3b 0a | 09 09 09 69 74 65 6d 4e |tID());.|...itemN|
|00005130| 6f 64 65 2e 73 65 74 41 | 74 74 72 69 62 75 74 65 |ode.setA|ttribute|
|00005140| 28 22 6c 61 62 65 6c 22 | 2c 20 69 74 65 6d 2e 67 |("label"|, item.g|
|00005150| 65 74 46 69 65 6c 64 28 | 22 74 69 74 6c 65 22 29 |etField(|"title")|
|00005160| 29 3b 0a 09 09 09 69 74 | 65 6d 4e 6f 64 65 2e 73 |);....it|emNode.s|
|00005170| 65 74 41 74 74 72 69 62 | 75 74 65 28 22 63 6c 61 |etAttrib|ute("cla|
|00005180| 73 73 22 2c 20 22 6c 69 | 73 74 69 74 65 6d 2d 69 |ss", "li|stitem-i|
|00005190| 63 6f 6e 69 63 22 29 3b | 0a 09 09 09 69 74 65 6d |conic");|....item|
|000051a0| 4e 6f 64 65 2e 73 65 74 | 41 74 74 72 69 62 75 74 |Node.set|Attribut|
|000051b0| 65 28 22 69 6d 61 67 65 | 22 2c 20 69 74 65 6d 2e |e("image|", item.|
|000051c0| 67 65 74 49 6d 61 67 65 | 53 72 63 28 29 29 3b 0a |getImage|Src());.|
|000051d0| 09 09 09 69 74 65 6d 4c | 69 73 74 2e 61 70 70 65 |...itemL|ist.appe|
|000051e0| 6e 64 43 68 69 6c 64 28 | 69 74 65 6d 4e 6f 64 65 |ndChild(|itemNode|
|000051f0| 29 3b 0a 09 09 7d 0a 09 | 09 0a 09 09 5f 75 70 64 |);...}..|...._upd|
|00005200| 61 74 65 50 72 65 76 69 | 65 77 28 29 3b 0a 09 7d |atePrevi|ew();..}|
|00005210| 0a 7d 50 4b 03 04 0a 00 | 00 00 00 00 22 ad 3d 38 |.}PK....|....".=8|
|00005220| 49 bf 3f 63 d1 0a 00 00 | d1 0a 00 00 23 00 15 00 |I.?c....|....#...|
|00005230| 63 6f 6e 74 65 6e 74 2f | 7a 6f 74 65 72 6f 2f 73 |content/|zotero/s|
|00005240| 65 6c 65 63 74 49 74 65 | 6d 73 44 69 61 6c 6f 67 |electIte|msDialog|
|00005250| 2e 6a 73 55 54 09 00 03 | bf e3 9f 47 b4 b6 a3 47 |.jsUT...|...G...G|
|00005260| 55 78 04 00 1d 09 1d 09 | 2f 2a 0a 20 20 20 20 2a |Ux......|/*. *|
|00005270| 2a 2a 2a 2a 20 42 45 47 | 49 4e 20 4c 49 43 45 4e |**** BEG|IN LICEN|
|00005280| 53 45 20 42 4c 4f 43 4b | 20 2a 2a 2a 2a 2a 0a 20 |SE BLOCK| *****. |
|00005290| 20 20 20 0a 20 20 20 20 | 43 6f 70 79 72 69 67 68 | . |Copyrigh|
|000052a0| 74 20 28 63 29 20 32 30 | 30 36 20 20 43 65 6e 74 |t (c) 20|06 Cent|
|000052b0| 65 72 20 66 6f 72 20 48 | 69 73 74 6f 72 79 20 61 |er for H|istory a|
|000052c0| 6e 64 20 4e 65 77 20 4d | 65 64 69 61 0a 20 20 20 |nd New M|edia. |
|000052d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000052e0| 20 20 20 20 20 47 65 6f | 72 67 65 20 4d 61 73 6f | Geo|rge Maso|
|000052f0| 6e 20 55 6e 69 76 65 72 | 73 69 74 79 2c 20 46 61 |n Univer|sity, Fa|
|00005300| 69 72 66 61 78 2c 20 56 | 69 72 67 69 6e 69 61 2c |irfax, V|irginia,|
|00005310| 20 55 53 41 0a 20 20 20 | 20 20 20 20 20 20 20 20 | USA. | |
|00005320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 68 74 74 | | htt|
|00005330| 70 3a 2f 2f 63 68 6e 6d | 2e 67 6d 75 2e 65 64 75 |p://chnm|.gmu.edu|
|00005340| 0a 20 20 20 20 0a 20 20 | 20 20 4c 69 63 65 6e 73 |. . | Licens|
|00005350| 65 64 20 75 6e 64 65 72 | 20 74 68 65 20 45 64 75 |ed under| the Edu|
|00005360| 63 61 74 69 6f 6e 61 6c | 20 43 6f 6d 6d 75 6e 69 |cational| Communi|
|00005370| 74 79 20 4c 69 63 65 6e | 73 65 2c 20 56 65 72 73 |ty Licen|se, Vers|
|00005380| 69 6f 6e 20 31 2e 30 20 | 28 74 68 65 20 22 4c 69 |ion 1.0 |(the "Li|
|00005390| 63 65 6e 73 65 22 29 3b | 0a 20 20 20 20 79 6f 75 |cense");|. you|
|000053a0| 20 6d 61 79 20 6e 6f 74 | 20 75 73 65 20 74 68 69 | may not| use thi|
|000053b0| 73 20 66 69 6c 65 20 65 | 78 63 65 70 74 20 69 6e |s file e|xcept in|
|000053c0| 20 63 6f 6d 70 6c 69 61 | 6e 63 65 20 77 69 74 68 | complia|nce with|
|000053d0| 20 74 68 65 20 4c 69 63 | 65 6e 73 65 2e 0a 20 20 | the Lic|ense.. |
|000053e0| 20 20 59 6f 75 20 6d 61 | 79 20 6f 62 74 61 69 6e | You ma|y obtain|
|000053f0| 20 61 20 63 6f 70 79 20 | 6f 66 20 74 68 65 20 4c | a copy |of the L|
|00005400| 69 63 65 6e 73 65 20 61 | 74 0a 20 20 20 20 0a 20 |icense a|t. . |
|00005410| 20 20 20 68 74 74 70 3a | 2f 2f 77 77 77 2e 6f 70 | http:|//www.op|
|00005420| 65 6e 73 6f 75 72 63 65 | 2e 6f 72 67 2f 6c 69 63 |ensource|.org/lic|
|00005430| 65 6e 73 65 73 2f 65 63 | 6c 31 2e 70 68 70 0a 20 |enses/ec|l1.php. |
|00005440| 20 20 20 0a 20 20 20 20 | 55 6e 6c 65 73 73 20 72 | . |Unless r|
|00005450| 65 71 75 69 72 65 64 20 | 62 79 20 61 70 70 6c 69 |equired |by appli|
|00005460| 63 61 62 6c 65 20 6c 61 | 77 20 6f 72 20 61 67 72 |cable la|w or agr|
|00005470| 65 65 64 20 74 6f 20 69 | 6e 20 77 72 69 74 69 6e |eed to i|n writin|
|00005480| 67 2c 20 73 6f 66 74 77 | 61 72 65 0a 20 20 20 20 |g, softw|are. |
|00005490| 64 69 73 74 72 69 62 75 | 74 65 64 20 75 6e 64 65 |distribu|ted unde|
|000054a0| 72 20 74 68 65 20 4c 69 | 63 65 6e 73 65 20 69 73 |r the Li|cense is|
|000054b0| 20 64 69 73 74 72 69 62 | 75 74 65 64 20 6f 6e 20 | distrib|uted on |
|000054c0| 61 6e 20 22 41 53 20 49 | 53 22 20 42 41 53 49 53 |an "AS I|S" BASIS|
|000054d0| 2c 0a 20 20 20 20 57 49 | 54 48 4f 55 54 20 57 41 |,. WI|THOUT WA|
|000054e0| 52 52 41 4e 54 49 45 53 | 20 4f 52 20 43 4f 4e 44 |RRANTIES| OR COND|
|000054f0| 49 54 49 4f 4e 53 20 4f | 46 20 41 4e 59 20 4b 49 |ITIONS O|F ANY KI|
|00005500| 4e 44 2c 20 65 69 74 68 | 65 72 20 65 78 70 72 65 |ND, eith|er expre|
|00005510| 73 73 20 6f 72 20 69 6d | 70 6c 69 65 64 2e 0a 20 |ss or im|plied.. |
|00005520| 20 20 20 53 65 65 20 74 | 68 65 20 4c 69 63 65 6e | See t|he Licen|
|00005530| 73 65 20 66 6f 72 20 74 | 68 65 20 73 70 65 63 69 |se for t|he speci|
|00005540| 66 69 63 20 6c 61 6e 67 | 75 61 67 65 20 67 6f 76 |fic lang|uage gov|
|00005550| 65 72 6e 69 6e 67 20 70 | 65 72 6d 69 73 73 69 6f |erning p|ermissio|
|00005560| 6e 73 20 61 6e 64 0a 20 | 20 20 20 6c 69 6d 69 74 |ns and. | limit|
|00005570| 61 74 69 6f 6e 73 20 75 | 6e 64 65 72 20 74 68 65 |ations u|nder the|
|00005580| 20 4c 69 63 65 6e 73 65 | 2e 0a 20 20 20 20 0a 20 | License|.. . |
|00005590| 20 20 20 2a 2a 2a 2a 2a | 20 45 4e 44 20 4c 49 43 | *****| END LIC|
|000055a0| 45 4e 53 45 20 42 4c 4f | 43 4b 20 2a 2a 2a 2a 2a |ENSE BLO|CK *****|
|000055b0| 0a 2a 2f 0a 0a 76 61 72 | 20 69 74 65 6d 73 56 69 |.*/..var| itemsVi|
|000055c0| 65 77 3b 0a 76 61 72 20 | 63 6f 6c 6c 65 63 74 69 |ew;.var |collecti|
|000055d0| 6f 6e 73 56 69 65 77 3b | 0a 76 61 72 20 69 6f 3b |onsView;|.var io;|
|000055e0| 0a 0a 2f 2a 0a 20 2a 20 | 77 69 6e 64 6f 77 20 74 |../*. * |window t|
|000055f0| 61 6b 65 73 20 74 77 6f | 20 61 72 67 75 6d 65 6e |akes two| argumen|
|00005600| 74 73 3a 0a 20 2a 20 69 | 6f 20 2d 20 75 73 65 64 |ts:. * i|o - used|
|00005610| 20 66 6f 72 20 69 6e 70 | 75 74 2f 6f 75 74 70 75 | for inp|ut/outpu|
|00005620| 74 20 28 64 61 74 61 4f | 75 74 20 69 73 20 6c 69 |t (dataO|ut is li|
|00005630| 73 74 20 6f 66 20 69 74 | 65 6d 20 49 44 73 29 0a |st of it|em IDs).|
|00005640| 20 2a 20 73 6f 75 72 63 | 65 73 4f 6e 6c 79 20 2d | * sourc|esOnly -|
|00005650| 20 77 68 65 74 68 65 72 | 20 6f 6e 6c 79 20 73 6f | whether| only so|
|00005660| 75 72 63 65 73 20 73 68 | 6f 75 6c 64 20 62 65 20 |urces sh|ould be |
|00005670| 73 68 6f 77 6e 20 69 6e | 20 74 68 65 20 77 69 6e |shown in| the win|
|00005680| 64 6f 77 0a 20 2a 2f 0a | 66 75 6e 63 74 69 6f 6e |dow. */.|function|
|00005690| 20 64 6f 4c 6f 61 64 28 | 29 0a 7b 0a 09 2f 2f 20 | doLoad(|).{..// |
|000056a0| 53 65 74 20 66 6f 6e 74 | 20 73 69 7a 65 20 66 72 |Set font| size fr|
|000056b0| 6f 6d 20 70 72 65 66 0a | 09 76 61 72 20 73 62 63 |om pref.|.var sbc|
|000056c0| 20 3d 20 64 6f 63 75 6d | 65 6e 74 2e 67 65 74 45 | = docum|ent.getE|
|000056d0| 6c 65 6d 65 6e 74 42 79 | 49 64 28 27 7a 6f 74 65 |lementBy|Id('zote|
|000056e0| 72 6f 2d 73 65 6c 65 63 | 74 2d 69 74 65 6d 73 2d |ro-selec|t-items-|
|000056f0| 63 6f 6e 74 61 69 6e 65 | 72 27 29 3b 0a 09 5a 6f |containe|r');..Zo|
|00005700| 74 65 72 6f 2e 73 65 74 | 46 6f 6e 74 53 69 7a 65 |tero.set|FontSize|
|00005710| 28 73 62 63 29 3b 0a 09 | 0a 09 69 6f 20 3d 20 77 |(sbc);..|..io = w|
|00005720| 69 6e 64 6f 77 2e 61 72 | 67 75 6d 65 6e 74 73 5b |indow.ar|guments[|
|00005730| 30 5d 3b 0a 09 0a 09 63 | 6f 6c 6c 65 63 74 69 6f |0];....c|ollectio|
|00005740| 6e 73 56 69 65 77 20 3d | 20 6e 65 77 20 5a 6f 74 |nsView =| new Zot|
|00005750| 65 72 6f 2e 43 6f 6c 6c | 65 63 74 69 6f 6e 54 72 |ero.Coll|ectionTr|
|00005760| 65 65 56 69 65 77 28 29 | 3b 0a 09 64 6f 63 75 6d |eeView()|;..docum|
|00005770| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00005780| 49 64 28 27 7a 6f 74 65 | 72 6f 2d 63 6f 6c 6c 65 |Id('zote|ro-colle|
|00005790| 63 74 69 6f 6e 73 2d 74 | 72 65 65 27 29 2e 76 69 |ctions-t|ree').vi|
|000057a0| 65 77 20 3d 20 63 6f 6c | 6c 65 63 74 69 6f 6e 73 |ew = col|lections|
|000057b0| 56 69 65 77 3b 0a 09 0a | 09 2f 2f 20 6d 6f 76 65 |View;...|.// move|
|000057c0| 20 74 6f 20 63 65 6e 74 | 65 72 20 6f 66 20 73 63 | to cent|er of sc|
|000057d0| 72 65 65 6e 0a 09 77 69 | 6e 64 6f 77 2e 73 69 7a |reen..wi|ndow.siz|
|000057e0| 65 54 6f 43 6f 6e 74 65 | 6e 74 28 29 3b 0a 09 77 |eToConte|nt();..w|
|000057f0| 69 6e 64 6f 77 2e 63 65 | 6e 74 65 72 57 69 6e 64 |indow.ce|nterWind|
|00005800| 6f 77 4f 6e 53 63 72 65 | 65 6e 28 29 3b 0a 7d 0a |owOnScre|en();.}.|
|00005810| 0a 66 75 6e 63 74 69 6f | 6e 20 64 6f 55 6e 6c 6f |.functio|n doUnlo|
|00005820| 61 64 28 29 0a 7b 0a 09 | 63 6f 6c 6c 65 63 74 69 |ad().{..|collecti|
|00005830| 6f 6e 73 56 69 65 77 2e | 75 6e 72 65 67 69 73 74 |onsView.|unregist|
|00005840| 65 72 28 29 3b 0a 09 69 | 66 28 69 74 65 6d 73 56 |er();..i|f(itemsV|
|00005850| 69 65 77 29 0a 09 09 69 | 74 65 6d 73 56 69 65 77 |iew)...i|temsView|
|00005860| 2e 75 6e 72 65 67 69 73 | 74 65 72 28 29 3b 0a 7d |.unregis|ter();.}|
|00005870| 0a 0a 66 75 6e 63 74 69 | 6f 6e 20 6f 6e 43 6f 6c |..functi|on onCol|
|00005880| 6c 65 63 74 69 6f 6e 53 | 65 6c 65 63 74 65 64 28 |lectionS|elected(|
|00005890| 29 0a 7b 0a 09 69 66 28 | 69 74 65 6d 73 56 69 65 |).{..if(|itemsVie|
|000058a0| 77 29 0a 09 09 69 74 65 | 6d 73 56 69 65 77 2e 75 |w)...ite|msView.u|
|000058b0| 6e 72 65 67 69 73 74 65 | 72 28 29 3b 0a 0a 09 69 |nregiste|r();...i|
|000058c0| 66 28 63 6f 6c 6c 65 63 | 74 69 6f 6e 73 56 69 65 |f(collec|tionsVie|
|000058d0| 77 2e 73 65 6c 65 63 74 | 69 6f 6e 2e 63 6f 75 6e |w.select|ion.coun|
|000058e0| 74 20 3d 3d 20 31 20 26 | 26 20 63 6f 6c 6c 65 63 |t == 1 &|& collec|
|000058f0| 74 69 6f 6e 73 56 69 65 | 77 2e 73 65 6c 65 63 74 |tionsVie|w.select|
|00005900| 69 6f 6e 2e 63 75 72 72 | 65 6e 74 49 6e 64 65 78 |ion.curr|entIndex|
|00005910| 20 21 3d 20 2d 31 29 0a | 09 7b 0a 09 09 76 61 72 | != -1).|.{...var|
|00005920| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 20 3d 20 63 6f | collect|ion = co|
|00005930| 6c 6c 65 63 74 69 6f 6e | 73 56 69 65 77 2e 5f 67 |llection|sView._g|
|00005940| 65 74 49 74 65 6d 41 74 | 52 6f 77 28 63 6f 6c 6c |etItemAt|Row(coll|
|00005950| 65 63 74 69 6f 6e 73 56 | 69 65 77 2e 73 65 6c 65 |ectionsV|iew.sele|
|00005960| 63 74 69 6f 6e 2e 63 75 | 72 72 65 6e 74 49 6e 64 |ction.cu|rrentInd|
|00005970| 65 78 29 3b 0a 09 09 63 | 6f 6c 6c 65 63 74 69 6f |ex);...c|ollectio|
|00005980| 6e 2e 73 65 74 53 65 61 | 72 63 68 28 27 27 29 3b |n.setSea|rch('');|
|00005990| 0a 09 09 0a 09 09 74 72 | 79 20 7b 0a 09 09 09 5a |......tr|y {....Z|
|000059a0| 6f 74 65 72 6f 2e 55 6e | 72 65 73 70 6f 6e 73 69 |otero.Un|responsi|
|000059b0| 76 65 53 63 72 69 70 74 | 49 6e 64 69 63 61 74 6f |veScript|Indicato|
|000059c0| 72 2e 64 69 73 61 62 6c | 65 28 29 3b 0a 09 09 09 |r.disabl|e();....|
|000059d0| 69 74 65 6d 73 56 69 65 | 77 20 3d 20 6e 65 77 20 |itemsVie|w = new |
|000059e0| 5a 6f 74 65 72 6f 2e 49 | 74 65 6d 54 72 65 65 56 |Zotero.I|temTreeV|
|000059f0| 69 65 77 28 63 6f 6c 6c | 65 63 74 69 6f 6e 2c 20 |iew(coll|ection, |
|00005a00| 28 77 69 6e 64 6f 77 2e | 61 72 67 75 6d 65 6e 74 |(window.|argument|
|00005a10| 73 5b 31 5d 20 3f 20 74 | 72 75 65 20 3a 20 66 61 |s[1] ? t|rue : fa|
|00005a20| 6c 73 65 29 29 3b 0a 09 | 09 09 64 6f 63 75 6d 65 |lse));..|..docume|
|00005a30| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|00005a40| 64 28 27 7a 6f 74 65 72 | 6f 2d 69 74 65 6d 73 2d |d('zoter|o-items-|
|00005a50| 74 72 65 65 27 29 2e 76 | 69 65 77 20 3d 20 69 74 |tree').v|iew = it|
|00005a60| 65 6d 73 56 69 65 77 3b | 0a 09 09 7d 0a 09 09 66 |emsView;|...}...f|
|00005a70| 69 6e 61 6c 6c 79 20 7b | 0a 09 09 09 5a 6f 74 65 |inally {|....Zote|
|00005a80| 72 6f 2e 55 6e 72 65 73 | 70 6f 6e 73 69 76 65 53 |ro.Unres|ponsiveS|
|00005a90| 63 72 69 70 74 49 6e 64 | 69 63 61 74 6f 72 2e 65 |criptInd|icator.e|
|00005aa0| 6e 61 62 6c 65 28 29 3b | 0a 09 09 7d 0a 09 09 0a |nable();|...}....|
|00005ab0| 09 09 69 66 20 28 63 6f | 6c 6c 65 63 74 69 6f 6e |..if (co|llection|
|00005ac0| 2e 69 73 4c 69 62 72 61 | 72 79 28 29 29 20 7b 0a |.isLibra|ry()) {.|
|00005ad0| 09 09 09 5a 6f 74 65 72 | 6f 2e 50 72 65 66 73 2e |...Zoter|o.Prefs.|
|00005ae0| 73 65 74 28 27 6c 61 73 | 74 56 69 65 77 65 64 46 |set('las|tViewedF|
|00005af0| 6f 6c 64 65 72 27 2c 20 | 27 4c 27 29 3b 0a 09 09 |older', |'L');...|
|00005b00| 7d 0a 09 09 69 66 20 28 | 63 6f 6c 6c 65 63 74 69 |}...if (|collecti|
|00005b10| 6f 6e 2e 69 73 43 6f 6c | 6c 65 63 74 69 6f 6e 28 |on.isCol|lection(|
|00005b20| 29 29 20 7b 0a 09 09 09 | 5a 6f 74 65 72 6f 2e 50 |)) {....|Zotero.P|
|00005b30| 72 65 66 73 2e 73 65 74 | 28 27 6c 61 73 74 56 69 |refs.set|('lastVi|
|00005b40| 65 77 65 64 46 6f 6c 64 | 65 72 27 2c 20 27 43 27 |ewedFold|er', 'C'|
|00005b50| 20 2b 20 63 6f 6c 6c 65 | 63 74 69 6f 6e 2e 72 65 | + colle|ction.re|
|00005b60| 66 2e 67 65 74 49 44 28 | 29 29 3b 0a 09 09 7d 0a |f.getID(|));...}.|
|00005b70| 09 09 65 6c 73 65 20 69 | 66 20 28 63 6f 6c 6c 65 |..else i|f (colle|
|00005b80| 63 74 69 6f 6e 2e 69 73 | 53 65 61 72 63 68 28 29 |ction.is|Search()|
|00005b90| 29 20 7b 0a 09 09 09 5a | 6f 74 65 72 6f 2e 50 72 |) {....Z|otero.Pr|
|00005ba0| 65 66 73 2e 73 65 74 28 | 27 6c 61 73 74 56 69 65 |efs.set(|'lastVie|
|00005bb0| 77 65 64 46 6f 6c 64 65 | 72 27 2c 20 27 53 27 20 |wedFolde|r', 'S' |
|00005bc0| 2b 20 63 6f 6c 6c 65 63 | 74 69 6f 6e 2e 72 65 66 |+ collec|tion.ref|
|00005bd0| 2e 69 64 29 3b 0a 09 09 | 7d 0a 09 7d 0a 7d 0a 0a |.id);...|}..}.}..|
|00005be0| 66 75 6e 63 74 69 6f 6e | 20 6f 6e 53 65 61 72 63 |function| onSearc|
|00005bf0| 68 28 29 0a 7b 0a 09 69 | 66 28 69 74 65 6d 73 56 |h().{..i|f(itemsV|
|00005c00| 69 65 77 29 0a 09 7b 0a | 09 09 76 61 72 20 73 65 |iew)..{.|..var se|
|00005c10| 61 72 63 68 56 61 6c 20 | 3d 20 64 6f 63 75 6d 65 |archVal |= docume|
|00005c20| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|00005c30| 64 28 27 7a 6f 74 65 72 | 6f 2d 74 62 2d 73 65 61 |d('zoter|o-tb-sea|
|00005c40| 72 63 68 27 29 2e 76 61 | 6c 75 65 3b 0a 09 09 69 |rch').va|lue;...i|
|00005c50| 74 65 6d 73 56 69 65 77 | 2e 73 65 74 46 69 6c 74 |temsView|.setFilt|
|00005c60| 65 72 28 27 73 65 61 72 | 63 68 27 2c 20 73 65 61 |er('sear|ch', sea|
|00005c70| 72 63 68 56 61 6c 29 3b | 0a 09 09 0a 09 09 64 6f |rchVal);|......do|
|00005c80| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|00005c90| 74 42 79 49 64 28 27 7a | 6f 74 65 72 6f 2d 74 62 |tById('z|otero-tb|
|00005ca0| 2d 73 65 61 72 63 68 2d | 63 61 6e 63 65 6c 27 29 |-search-|cancel')|
|00005cb0| 2e 68 69 64 64 65 6e 20 | 3d 20 73 65 61 72 63 68 |.hidden |= search|
|00005cc0| 56 61 6c 20 3d 3d 20 22 | 22 3b 0a 09 7d 0a 7d 0a |Val == "|";..}.}.|
|00005cd0| 0a 66 75 6e 63 74 69 6f | 6e 20 6f 6e 49 74 65 6d |.functio|n onItem|
|00005ce0| 53 65 6c 65 63 74 65 64 | 28 29 0a 7b 0a 09 0a 7d |Selected|().{...}|
|00005cf0| 0a 0a 66 75 6e 63 74 69 | 6f 6e 20 64 6f 41 63 63 |..functi|on doAcc|
|00005d00| 65 70 74 28 29 0a 7b 0a | 09 69 6f 2e 64 61 74 61 |ept().{.|.io.data|
|00005d10| 4f 75 74 20 3d 20 69 74 | 65 6d 73 56 69 65 77 2e |Out = it|emsView.|
|00005d20| 67 65 74 53 65 6c 65 63 | 74 65 64 49 74 65 6d 73 |getSelec|tedItems|
|00005d30| 28 74 72 75 65 29 3b 0a | 7d 50 4b 03 04 0a 00 00 |(true);.|}PK.....|
|00005d40| 00 00 00 7c 04 90 36 3d | dc 8d aa 35 0d 00 00 35 |...|..6=|...5...5|
|00005d50| 0d 00 00 20 00 15 00 63 | 6f 6e 74 65 6e 74 2f 7a |... ...c|ontent/z|
|00005d60| 6f 74 65 72 6f 2f 61 64 | 76 61 6e 63 65 64 53 65 |otero/ad|vancedSe|
|00005d70| 61 72 63 68 2e 6a 73 55 | 54 09 00 03 2c fd 22 46 |arch.jsU|T...,."F|
|00005d80| b4 b6 a3 47 55 78 04 00 | 1d 09 1d 09 76 61 72 20 |...GUx..|....var |
|00005d90| 5a 6f 74 65 72 6f 41 64 | 76 61 6e 63 65 64 53 65 |ZoteroAd|vancedSe|
|00005da0| 61 72 63 68 20 3d 20 6e | 65 77 20 66 75 6e 63 74 |arch = n|ew funct|
|00005db0| 69 6f 6e 28 29 20 7b 0a | 09 74 68 69 73 2e 6f 6e |ion() {.|.this.on|
|00005dc0| 4c 6f 61 64 20 3d 20 6f | 6e 4c 6f 61 64 3b 0a 09 |Load = o|nLoad;..|
|00005dd0| 74 68 69 73 2e 73 65 61 | 72 63 68 20 3d 20 73 65 |this.sea|rch = se|
|00005de0| 61 72 63 68 3b 0a 09 74 | 68 69 73 2e 63 6c 65 61 |arch;..t|his.clea|
|00005df0| 72 20 3d 20 63 6c 65 61 | 72 3b 0a 09 74 68 69 73 |r = clea|r;..this|
|00005e00| 2e 73 61 76 65 20 3d 20 | 73 61 76 65 3b 0a 09 74 |.save = |save;..t|
|00005e10| 68 69 73 2e 6f 6e 44 62 | 6c 43 6c 69 63 6b 20 3d |his.onDb|lClick =|
|00005e20| 20 6f 6e 44 62 6c 43 6c | 69 63 6b 3b 0a 09 74 68 | onDblCl|ick;..th|
|00005e30| 69 73 2e 6f 6e 55 6e 6c | 6f 61 64 20 3d 20 6f 6e |is.onUnl|oad = on|
|00005e40| 55 6e 6c 6f 61 64 3b 0a | 09 0a 09 74 68 69 73 2e |Unload;.|...this.|
|00005e50| 69 74 65 6d 73 56 69 65 | 77 20 3d 20 66 61 6c 73 |itemsVie|w = fals|
|00005e60| 65 3b 0a 09 0a 09 76 61 | 72 20 5f 73 65 61 72 63 |e;....va|r _searc|
|00005e70| 68 42 6f 78 3b 0a 09 0a | 09 66 75 6e 63 74 69 6f |hBox;...|.functio|
|00005e80| 6e 20 6f 6e 4c 6f 61 64 | 28 29 20 7b 0a 09 09 5f |n onLoad|() {..._|
|00005e90| 73 65 61 72 63 68 42 6f | 78 20 3d 20 64 6f 63 75 |searchBo|x = docu|
|00005ea0| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00005eb0| 79 49 64 28 27 7a 6f 74 | 65 72 6f 2d 73 65 61 72 |yId('zot|ero-sear|
|00005ec0| 63 68 2d 62 6f 78 27 29 | 3b 0a 09 09 0a 09 09 2f |ch-box')|;....../|
|00005ed0| 2f 20 53 65 74 20 66 6f | 6e 74 20 73 69 7a 65 20 |/ Set fo|nt size |
|00005ee0| 66 72 6f 6d 20 70 72 65 | 66 0a 09 09 76 61 72 20 |from pre|f...var |
|00005ef0| 73 62 63 20 3d 20 64 6f | 63 75 6d 65 6e 74 2e 67 |sbc = do|cument.g|
|00005f00| 65 74 45 6c 65 6d 65 6e | 74 42 79 49 64 28 27 7a |etElemen|tById('z|
|00005f10| 6f 74 65 72 6f 2d 73 65 | 61 72 63 68 2d 62 6f 78 |otero-se|arch-box|
|00005f20| 2d 63 6f 6e 74 61 69 6e | 65 72 27 29 3b 0a 09 09 |-contain|er');...|
|00005f30| 5a 6f 74 65 72 6f 2e 73 | 65 74 46 6f 6e 74 53 69 |Zotero.s|etFontSi|
|00005f40| 7a 65 28 73 62 63 29 3b | 0a 09 09 0a 09 09 76 61 |ze(sbc);|......va|
|00005f50| 72 20 69 6f 20 3d 20 77 | 69 6e 64 6f 77 2e 61 72 |r io = w|indow.ar|
|00005f60| 67 75 6d 65 6e 74 73 5b | 30 5d 3b 0a 09 09 5f 73 |guments[|0];..._s|
|00005f70| 65 61 72 63 68 42 6f 78 | 2e 73 65 61 72 63 68 20 |earchBox|.search |
|00005f80| 3d 20 69 6f 2e 64 61 74 | 61 49 6e 2e 73 65 61 72 |= io.dat|aIn.sear|
|00005f90| 63 68 3b 0a 09 7d 0a 09 | 0a 09 0a 09 66 75 6e 63 |ch;..}..|....func|
|00005fa0| 74 69 6f 6e 20 73 65 61 | 72 63 68 28 29 20 7b 0a |tion sea|rch() {.|
|00005fb0| 09 09 5f 73 65 61 72 63 | 68 42 6f 78 2e 75 70 64 |.._searc|hBox.upd|
|00005fc0| 61 74 65 53 65 61 72 63 | 68 28 29 3b 0a 09 09 0a |ateSearc|h();....|
|00005fd0| 09 09 2f 2f 20 41 20 6d | 69 6e 69 6d 61 6c 20 69 |..// A m|inimal i|
|00005fe0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |mplement|ation of|
|00005ff0| 20 5a 6f 74 65 72 6f 2e | 43 6f 6c 6c 65 63 74 69 | Zotero.|Collecti|
|00006000| 6f 6e 54 72 65 65 56 69 | 65 77 0a 09 09 76 61 72 |onTreeVi|ew...var|
|00006010| 20 69 74 65 6d 47 72 6f | 75 70 20 3d 20 7b 0a 09 | itemGro|up = {..|
|00006020| 09 09 69 73 53 65 61 72 | 63 68 4d 6f 64 65 3a 20 |..isSear|chMode: |
|00006030| 66 75 6e 63 74 69 6f 6e | 28 29 20 7b 20 72 65 74 |function|() { ret|
|00006040| 75 72 6e 20 74 72 75 65 | 3b 20 7d 2c 0a 09 09 09 |urn true|; },....|
|00006050| 67 65 74 43 68 69 6c 64 | 49 74 65 6d 73 3a 20 66 |getChild|Items: f|
|00006060| 75 6e 63 74 69 6f 6e 20 | 28 29 20 7b 0a 09 09 09 |unction |() {....|
|00006070| 09 76 61 72 20 69 64 73 | 20 3d 20 5f 73 65 61 72 |.var ids| = _sear|
|00006080| 63 68 42 6f 78 2e 73 65 | 61 72 63 68 2e 73 65 61 |chBox.se|arch.sea|
|00006090| 72 63 68 28 29 3b 0a 09 | 09 09 09 72 65 74 75 72 |rch();..|...retur|
|000060a0| 6e 20 5a 6f 74 65 72 6f | 2e 49 74 65 6d 73 2e 67 |n Zotero|.Items.g|
|000060b0| 65 74 28 69 64 73 29 3b | 0a 09 09 09 7d 2c 0a 09 |et(ids);|....},..|
|000060c0| 09 09 69 73 4c 69 62 72 | 61 72 79 3a 20 66 75 6e |..isLibr|ary: fun|
|000060d0| 63 74 69 6f 6e 20 28 29 | 20 7b 20 72 65 74 75 72 |ction ()| { retur|
|000060e0| 6e 20 66 61 6c 73 65 3b | 20 7d 2c 0a 09 09 09 69 |n false;| },....i|
|000060f0| 73 43 6f 6c 6c 65 63 74 | 69 6f 6e 3a 20 66 75 6e |sCollect|ion: fun|
|00006100| 63 74 69 6f 6e 20 28 29 | 20 7b 20 72 65 74 75 72 |ction ()| { retur|
|00006110| 6e 20 66 61 6c 73 65 3b | 20 7d 2c 0a 09 09 09 69 |n false;| },....i|
|00006120| 73 53 65 61 72 63 68 3a | 20 66 75 6e 63 74 69 6f |sSearch:| functio|
|00006130| 6e 20 28 29 20 7b 20 72 | 65 74 75 72 6e 20 74 72 |n () { r|eturn tr|
|00006140| 75 65 3b 20 7d 0a 09 09 | 7d 0a 09 09 0a 09 09 69 |ue; }...|}......i|
|00006150| 66 20 28 74 68 69 73 2e | 69 74 65 6d 73 56 69 65 |f (this.|itemsVie|
|00006160| 77 29 20 7b 0a 09 09 09 | 74 68 69 73 2e 69 74 65 |w) {....|this.ite|
|00006170| 6d 73 56 69 65 77 2e 75 | 6e 72 65 67 69 73 74 65 |msView.u|nregiste|
|00006180| 72 28 29 3b 0a 09 09 7d | 0a 09 09 0a 09 09 74 68 |r();...}|......th|
|00006190| 69 73 2e 69 74 65 6d 73 | 56 69 65 77 20 3d 20 6e |is.items|View = n|
|000061a0| 65 77 20 5a 6f 74 65 72 | 6f 2e 49 74 65 6d 54 72 |ew Zoter|o.ItemTr|
|000061b0| 65 65 56 69 65 77 28 69 | 74 65 6d 47 72 6f 75 70 |eeView(i|temGroup|
|000061c0| 2c 20 66 61 6c 73 65 29 | 3b 0a 09 09 64 6f 63 75 |, false)|;...docu|
|000061d0| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|000061e0| 79 49 64 28 27 7a 6f 74 | 65 72 6f 2d 69 74 65 6d |yId('zot|ero-item|
|000061f0| 73 2d 74 72 65 65 27 29 | 2e 76 69 65 77 20 3d 20 |s-tree')|.view = |
|00006200| 74 68 69 73 2e 69 74 65 | 6d 73 56 69 65 77 3b 0a |this.ite|msView;.|
|00006210| 09 7d 0a 09 0a 09 0a 09 | 66 75 6e 63 74 69 6f 6e |.}......|function|
|00006220| 20 63 6c 65 61 72 28 29 | 20 7b 0a 09 09 69 66 20 | clear()| {...if |
|00006230| 28 74 68 69 73 2e 69 74 | 65 6d 73 56 69 65 77 29 |(this.it|emsView)|
|00006240| 20 7b 0a 09 09 09 74 68 | 69 73 2e 69 74 65 6d 73 | {....th|is.items|
|00006250| 56 69 65 77 2e 75 6e 72 | 65 67 69 73 74 65 72 28 |View.unr|egister(|
|00006260| 29 3b 0a 09 09 7d 0a 09 | 09 64 6f 63 75 6d 65 6e |);...}..|.documen|
|00006270| 74 2e 67 65 74 45 6c 65 | 6d 65 6e 74 42 79 49 64 |t.getEle|mentById|
|00006280| 28 27 7a 6f 74 65 72 6f | 2d 69 74 65 6d 73 2d 74 |('zotero|-items-t|
|00006290| 72 65 65 27 29 2e 76 69 | 65 77 20 3d 20 6e 75 6c |ree').vi|ew = nul|
|000062a0| 6c 3b 0a 09 09 0a 09 09 | 76 61 72 20 73 20 3d 20 |l;......|var s = |
|000062b0| 6e 65 77 20 5a 6f 74 65 | 72 6f 2e 53 65 61 72 63 |new Zote|ro.Searc|
|000062c0| 68 28 29 3b 0a 09 09 73 | 2e 61 64 64 43 6f 6e 64 |h();...s|.addCond|
|000062d0| 69 74 69 6f 6e 28 27 74 | 69 74 6c 65 27 2c 20 27 |ition('t|itle', '|
|000062e0| 63 6f 6e 74 61 69 6e 73 | 27 2c 20 27 27 29 3b 0a |contains|', '');.|
|000062f0| 09 09 5f 73 65 61 72 63 | 68 42 6f 78 2e 73 65 61 |.._searc|hBox.sea|
|00006300| 72 63 68 20 3d 20 73 3b | 0a 09 7d 0a 09 0a 09 0a |rch = s;|..}.....|
|00006310| 09 66 75 6e 63 74 69 6f | 6e 20 73 61 76 65 28 29 |.functio|n save()|
|00006320| 20 7b 0a 09 09 5f 73 65 | 61 72 63 68 42 6f 78 2e | {..._se|archBox.|
|00006330| 75 70 64 61 74 65 53 65 | 61 72 63 68 28 29 3b 0a |updateSe|arch();.|
|00006340| 09 09 0a 09 09 76 61 72 | 20 70 72 6f 6d 70 74 53 |.....var| promptS|
|00006350| 65 72 76 69 63 65 20 3d | 20 43 6f 6d 70 6f 6e 65 |ervice =| Compone|
|00006360| 6e 74 73 2e 63 6c 61 73 | 73 65 73 5b 22 40 6d 6f |nts.clas|ses["@mo|
|00006370| 7a 69 6c 6c 61 2e 6f 72 | 67 2f 65 6d 62 65 64 63 |zilla.or|g/embedc|
|00006380| 6f 6d 70 2f 70 72 6f 6d | 70 74 2d 73 65 72 76 69 |omp/prom|pt-servi|
|00006390| 63 65 3b 31 22 5d 0a 09 | 09 09 09 09 09 09 09 2e |ce;1"]..|........|
|000063a0| 67 65 74 53 65 72 76 69 | 63 65 28 43 6f 6d 70 6f |getServi|ce(Compo|
|000063b0| 6e 65 6e 74 73 2e 69 6e | 74 65 72 66 61 63 65 73 |nents.in|terfaces|
|000063c0| 2e 6e 73 49 50 72 6f 6d | 70 74 53 65 72 76 69 63 |.nsIProm|ptServic|
|000063d0| 65 29 3b 0a 09 09 0a 09 | 09 76 61 72 20 75 6e 74 |e);.....|.var unt|
|000063e0| 69 74 6c 65 64 20 3d 20 | 5a 6f 74 65 72 6f 2e 44 |itled = |Zotero.D|
|000063f0| 42 2e 67 65 74 4e 65 78 | 74 4e 61 6d 65 28 27 63 |B.getNex|tName('c|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.